boscomanilow128:
Can you post at least one example of code.
hello guys,
I have been thinking over days already, it seems that for all indicators, any counter with i = prev_calculated could do more than fine as it points towards the previous candle which is already a calculated figure. why bother to do i = prev_calculated - 1 at all?
actually it seems to me that if prev_calculated really mean previously calculated, then we should even set i = prev_calculated + 1 for our calculation in OnCalculate()... Why not?
Bosco
this article mightbe helpful: Creation of Custom Indicators |
Creation of Custom Indicators - Simple Programs in MQL4 - MQL4 Tutorial
- book.mql4.com
Creation of Custom Indicators - Simple Programs in MQL4 - MQL4 Tutorial
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
hello guys,
I have been thinking over days already, it seems that for all indicators, any counter with i = prev_calculated could do more than fine as it points towards the previous candle which is already a calculated figure. why bother to do i = prev_calculated - 1 at all?
actually it seems to me that if prev_calculated really mean previously calculated, then we should even set i = prev_calculated + 1 for our calculation in OnCalculate()... Why not?
Bosco