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
shift means the bar from the last one (last one is bar 0-always the actuell bar, if there are no disconnection)
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
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?
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?
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.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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