- fjgwey: When I debugged it it seemed like the error at something to do with the rsi array.Your error message told you what line, not what “seemed like.”
-
int rsicontrol, pricedatapoints, rsidata, pricearraysize, candlestocopy, shift, bearishbars; ⋮ pricedatapoints = CopyRates(_Symbol, 0, 0, candlestocopy, pricedata); ⋮ closeprice = pricedata[shift].close;
Your variable was uninitialized (random value including zero), you copied nothing, array exceeded.
William Roeder #:
I see. Thanks, I made a mistake in ordering the lines. I just debugged it and got no errors. Still got the real tick mismatch stuff but at least my code has no issues.
- Your error message told you what line, not what “seemed like.”
- Your variable was uninitialized (random value including zero), you copied nothing, array exceeded.

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. I am attempting to make an EA using RSI and candle patterns. When I try to backtest it with real ticks, I get the tick mismatch errors like I usually do lately. Then when I use it on the simulated 'every tick' option I get an 'array out of size' error and OnTick() critical error.
Here is the code. When I debugged it it seemed like the error at something to do with the rsi array. Thanks in advance for the help.