Some one please help me out. Much thanks appreciated!
- Compute your limit. That is the current chart's index. Use iBarShift(TimeFrame) to find the index on the TimeFrame chart. Get that bar's time and use iBarShift(PERIOD_CURRENT) to find the real limit. You have to re-process all bars that are part of TimeFrame bar zero, the stair step effect.
- In your loop, for each i, use iBarShift to find the index on the TimeFrame chart and get the value from there.
- Compute your lookbacks correctly. For TFMA it is not MA_Period it is MA_Period * PeriodSeconds(TimeFrame) /
PeriodSeconds(PERIOD_CURRENT)
How to do your lookbacks correctly.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register