High and Low from Previous Period?

 

Hello,

I'm working on attempting to make a custom indicator...  I'm wondering how I can get the High and Low of the Previous Period...  So,  For Example, if I'm looking at the Hourly chart,  the previous period is the previous day...  If I'm looking at the H4 Chart,  the previous period would be the previous Week, etc...


So on your chart,  when you have Period Separators visible,  I basically want the High and Low of the previous box...


Thanks!

 
And what is your target language ?
 
Marco vd Heijden:
And what is your target language ?

It's for MT4...  Sorry,  should have mentioned that... :)

 
  1. Then why did you post your MT4 question in the Root / MT5 Indicators section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
    Next time post in the correct place. The moderators will likely move this thread there soon.

  2. You can use a MTF MA with period of one. Attached.
Files:
Reason: