- Help me fix the bug.....=}
- Please fix this indicator or EA
- Recover a data type from an indicator
- Don't double post! You already had this thread open.
General rules and best pratices of the Forum. - General - MQL5 programming forum -
for(i = 0; i <= limit; i++) ⋮ fasterMAnow = iMA(NULL, 0, FasterMA, FasterShift, FasterMode, PRICE_CLOSE, i+1); fasterMAprevious = iMA(NULL, 0, FasterMA, FasterShift, FasterMode, PRICE_CLOSE, i+5); fasterMAafter = iMA(NULL, 0, FasterMA, FasterShift, FasterMode, PRICE_CLOSE, i-1);
When i is zero, you try to read the future. If i+1 is now, then after must be i+0.
- When counted_bars is less than six you try to read past the
end of the chart.
How to do your lookbacks correctly. -
for (counter=i ;counter<=i+9;counter++) { AvgRange=AvgRange+MathAbs(High[counter]-Low[counter]);
When counted_bars is less than ten you try to read past the end of the chart.
How to do your lookbacks correctly. -
if ((CrossDown[0] == High[0] + Range*0.5)
Doubles are rarely equal. Understand the links in:
The == operand. - MQL4 programming forum

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