Couldo you just confirm for me please - getting high/low values

 

Hi

I want to write an indicator that returns the previous monlthy high and low relating to each bar ...

so the Time for bar n is Time[n]

and to get the Monthly bar no relating to that time is

m_bar_no = iBarShift(NULL,PERIOD_MN1,Time[n])

and to get the previous monthly high/low is

iHigh(NULL,PERIOD_MN1,m_bar_no + 1)

iLow(NULL,PERIOD_MN1,m_bar_no + 1)

Is that correct ?

Thanks

Paul

 
murfinp:

Hi

I want to write an indicator that returns the previous monlthy high and low relating to each bar ...

so the Time for bar n is Time[n]

and to get the Monthly bar no relating to that time is

m_bar_no = iBarShift(NULL,PERIOD_MN1,Time[n])

and to get the previous monthly high/low is

iHigh(NULL,PERIOD_MN1,m_bar_no + 1)

iLow(NULL,PERIOD_MN1,m_bar_no + 1)

Is that correct ?

Thanks

Paul

why so difficult. use the ihigh and ilow with PERIOD_MN1 und shift 1. ihigh(NULL, PERIOD_MN1,1). thats all.
shift means the bar from the last one (last one is bar 0-always the actuell bar, if there are no disconnection)
 
hello12345:
murfinp:

Hi

I want to write an indicator that returns the previous monlthy high and low relating to each bar ...

so the Time for bar n is Time[n]

and to get the Monthly bar no relating to that time is

m_bar_no = iBarShift(NULL,PERIOD_MN1,Time[n])

and to get the previous monthly high/low is

iHigh(NULL,PERIOD_MN1,m_bar_no + 1)

iLow(NULL,PERIOD_MN1,m_bar_no + 1)

Is that correct ?

Thanks

Paul

why so difficult. use the ihigh and ilow with PERIOD_MN1 und shift 1. ihigh(NULL, PERIOD_MN1,1). thats all.
shift means the bar from the last one (last one is bar 0-always the actuell bar, if there are no disconnection)
 

Hi

Because I am not always wanting to do it releative to the current bar but for all bars and regardless of the timeframe of the chart... does that make sense?

 
murfinp:

Hi

Because I am not always wanting to do it releative to the current bar but for all bars and regardless of the timeframe of the chart... does that make sense?

regardless of timeframe of the chart is no problem if you use the period_MN1 in ihigh.
if you use it as an indicator it will be for all other bars in the past too. try out.

i dont know why you need this information and for what you will use it.