Marco De Angelis:
Hi,
I'm struggling in converting this old indicator to a newer version that uses OnCalculate() instead of onstart().
In the version with OnCalculate() the indicator stops giving any type of indication.
I have read the documentation but there's something I'm missing about how to use the OnCalculate() function and the differences between using onstart().
This indicator has no relevance for me, I just want to learn from what I'm doing wrong and I would like to understand how to convert old indicators into new versions.
Thanks to all who want to explain me.
OLD INDICATOR
NEW INDICATOR
Old:
int i; int counted_bars=IndicatorCounted(); if(counted_bars > 0) { counted_bars--; } int limit = Bars-counted_bars-1; Comment(limit); // 1
New:
int i; int limit = rates_total - prev_calculated-1; Comment(limit); // -1
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
Thanks to all who want to explain me.
OLD INDICATOR
NEW INDICATOR