Yearly Quarterly Monthly Weekly Daily H4 H1 OHLC Lines – Last Bar Only Version

v10.3
Yearly Quarterly Monthly Weekly Daily H4 H1 OHLC Lines – Last Bar Only Version

This is an alternative version of the ‘Yearly Quarterly Monthly Weekly Daily H4 H1 OHLC Lines’ indicator that can be found here:

https://www.prorealcode.com/prorealtime-indicators/candlesticks-ohlc-yearly-quarterly-monthly-weekly-daily-h4-h1/

This version only draws the latest open, high, low and close lines and labels them so that you know which period they are drawn from and what price they are at.

As with the first version you can turn off any periods that you don’t want to see. You can also select whether you see just open and close lines or just high and low lines or all of them. You can also turn off the displayed price by using the ‘Values’ setting.

As with the first version you can set a look back period so that you can see the OHLC from any period. So you can plot lines from 2 months ago or 2 days ago or 3 weeks ago etc. By applying the indicator multiple times to a chart with different look back settings you can have for example the OHLC values from the last three months on the chart.

All lines are labelled with price first followed by the period in [ ] and then the look back period. The lines are colour coded as follows:

  • Open = light blue
  • High =  green
  • Low = red
  • Close = dark blue

So for example:

  • 1029.5 [D] 2 in green = the high from 2 days ago which was at a price of 1029.5
  • 1054.2 [H1] 1 in red = the low from the last hour which was at a price of 1054.2

This indicator can be used to recognize possible support and resistance levels and for breakout trading.

I recommend using this indicator alongside my ‘Last Two Highest High and Lowest Low as Horizontal Lines – Yearly Quarterly, Monthly, Weekly, Daily, 4 Hour and 1 Hour’ indicator. This will give you lines representing the extension of connecting the last two highs and last two lows of each period. The two indicators plotted on the same chart can show you levels that others may be looking at.  The labels in this indicator are not in [ ] so you can know whether you are looking at a horizontal OHLC line or the extension of a line connecting highs or lows when both indicators are on the same chart. That indicator can be found here:

https://www.prorealcode.com/prorealtime-indicators/last-two-highest-high-and-lowest-low-as-horizontal-lines-yearly-quarterly-monthly-weekly-daily-4-hour-and-1-hour/

I advise downloading and importing the ITF file to get full functionality.

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Vonasi • 04/15/2019 #

    Change line 76 to if opendayofweek opendayofweek[1] and opendayofweek 0 then if you want Sunday data to be included with Friday data. This avoids Monday the lines being based on the normally small Sunday candle OHLC.

  2. Vonasi • 04/15/2019 #

    I just noticed that the above post makes no sense as the symbols have been removed. Here in English is what the conditions should be: IF opendayofweek is different to opendayofweek[1] AND opendayofweek is different to 0 THEN

  3. crolakstrading • 04/15/2019 #

    Hi Vonasi,
    Hope you are well.
    Above coding all works fine but on 4hr chart, 4hr lines don’t work.. this is only the 4hr chart.. any reason for that??

    • Vonasi • 04/15/2019 #

      It is a long time since I coded this. You may have found a coding error. At a glance I think the OPENHOUR settings might be wrong in line 48. Try changing OPENHOUR to HOUR and if that does not work I will check it tomorrow.

    • Vonasi • 04/15/2019 #

      Yes that was the issue. I have posted an updated ITF file here: https://www.prorealcode.com/topic/ohlc-y-m-w-d-h4-h1-last-bar-indicator-minor-fix/

  4. crolakstrading • 04/15/2019 #

    @vonasi Thank you for fixing the issue! This is a great indicator.

  5. gregoire • 04/15/2019 #

    good evening vonasi , I had made the request to create this indicator a few years ago and I gave up because I did not have the level nevertheless I use it since and I would like to take advantage of it. j would like to change the top preceding above higherhigh[1] and precede low by preceding lower lowerlow[1] on all ut !…it’s much more efficient… I do not use the 4H and 1H but instead I would like the 15MN and in the end we added little yh-yl,qh-ql,th-tl,mh-ml,dh-dl,15h-15l, it is better on the graph for colors if you could set them without entering the code as everyone does what he wants, I have an option to trace fibo that I little activated or not , I personally do not use it, on the other hand can we added a signal like an arrow when the candle closes above or below the set up 15 minutes?, and finally if you want to complete this indicator a scrrenner on the same basis having the choice of research C would be very effective.you do great work I would like to have your level for code that I like , I continue to learn every day thanks to the forum member… Thank you…

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
lee Thank you!
Iván Hi You should delete from the indicator code all drawing functions and all variables not us...
Iván I've created a screener to show [longcondition or shortcondition]
Chrisinobi Hallo Ivan, Danke das ist Perfekt !! Kannst du bitte in der Screener-Bibliothek die itf. hoc...
jacquesgermain sì da aggiungere
Maik2404 auf welchen Wert muss ich die Kompresionsperiode stellen?
jacquesgermain — Période de compression : ce paramètre détermine la période de rétrospection utilisée pour ...
Roland57800 Bonjour Noobywan, si je comprends bien l'utilisation de ce code que je trouve particulièr...
Noobywan Bonjour, quand la question a été posée dans le forum à celui qui avait fait la requête en am...
Fabian This Code draws only a retangle if the condition has been confirmed and NOT before (in that ...
fazel53 How do i attach this indicator to my mt5 platform?
Nicolas You can't! All indicators here are for ProRealTime trading platform: https://www.prorealtime...
Manu L. Bonjour Nicolas, j'ai créé un screener avec l'aide à la prog en TF weekly mais je voudrai...
wtangsiri C'est exactement le même signal que donne le croisement et le décroisement de deux EMA (7 et...
PHAN100 bonjour, j'ai un bug sur le programme recopié prorealtime me dit qu'il y a un problème à ...
PHAN100 bonjour, bravo à l'auteur pour cet indicateur visuel sur le graphique, il nous reste à va...
mistersylv What parameter should we change to make another channel appear in the higher or lower time u...
yeoreum Thank you very much for the screener, it reminds me on Minervini VCP. How to change th...
reecet any codes like this but in minutes and hours rather than days?
PHAN100 bonjour, je viens de tester ce screener, je constate une anomalie...il ne renvoie pas l'e...
Oxxoz Re bonjour Vivien, Il me smeble que 3 mois, c'est 60 séances. Cordialement,
Vinks_o_7 thanks ...and It can be used on a monthly and weekly basis by changing just the duration in ...
nicko Many Thanks Viv. It looks good
Nokis Bonjour Vivien, Comment je peux faire pour adapter ton code afin: De cibler les sociétés q...
sam00075 I tried it today and it gave great results. So a big Thanks !
khashayar Hi Can you please upload the TMA channel code? Thank you
oyinloyea Is it possible to have the open and close price in Box format for the different sessions. Th...
Luciole I aslo got this error message with EU version : "A positive integer parameter is expected wi...
Suzu Yuk So Does anyone knows how to fix the error "“A positive integer parameter is expected with HI...
Thomas I haven't solved it yet. I suspect it has to do with the data cache. The problem has never o...
Bard Hi @Vonasi, this is an excellent tool! I noticed you times by 180 and was wondering why? W...
Bard I have no idea what is wrong with the posting on this website. I have problems editing posts...
Bard And now my first post displays okay? It literally had copies of my orig post all added toget...

Top