-
int max = rates_total - prev_calculated - lookback;
After the first run max is always negative, nothing happens.
Do your lookbacks correctly #9 — #14 & #19
-
if(tipo == "ST") STBuffer[index]=price; else HMBuffer[index]=price;
You never initialize them to EMPTY_VALUE.
William Roeder #:
-
After the first run max is always negative, nothing happens.
Do your lookbacks correctly #9 — #14 & #19
- You never initialize them to EMPTY_VALUE.
Thx a lot. I will take a look at the posts to work it out.
Rodolfo.

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
Hi, please your help with this:
My indicators suddenly starts to plot the arrow marks all over the chart. The indicator fails more often in M1 timeframe, but it also happens in higher timeframes if i let it run long enough.
If i reset the indicator or recompile it, it re-deploys itself and all seems fine again.
I do not experience this with the indicators that MT4 has as standard, for example fractals, so i assume is my code.
Attached you can see an image of the indicator when it fails and after i reset it. I'm also attaching the code of the indicator.
Thank you very much!
Rodolfo.
