Error Parabolic "array out of range"
-
Hi,
I wanted to use the parabolic indicator, but get an error at runtime:2017.01.18 19:26:11.140 2016.01.03 23:00:01 Testing pass stopped due to a critical error in the EA
2017.01.18 19:26:11.102 2016.01.03 23:00:01 Parabolic EURUSD,H1: array out of range in 'Parabolic.mq4' (156,43)
2017.01.18 19:26:08.762 Parabolic inputs: InpSARStep=0.02; InpSARMaximum=0.2;
2017.01.18 19:26:08.762 Custom indicator Parabolic EURUSD,H1: loaded successfullyCould this be fixed?
Mic
-
This problem comes from some indicator I guess. Last month I was working on a MQL4 to MQL5 converter so I now understand indicators a liiiitle bit better. Not very much better
So while I was testing different indicators I noticed something. That error "array out of range" would appear in MQL5 indicator if anything is wrong with the buffers inside OnCalculate(). But the same indicator could work in MQL4 without problems when there is no #property strict. It seems that in MQL4 you have the option to set the code as strict mode or not, while in MQL5 you don't have this option - it's always strict.So, if your indicator has #property strict you can try how it will work without it. Otherwise you must fix the problem in the code.
-
... and how can I set it to strict?
-
Remove #property strict if exists. If it doesn't exist or it still gives that error, then the code must be fixed
-
I'm not aware having coded #property strict.
... and when you say "code needs to be fixed" you are talking about your code
? -
Parabolic.mq4 - what is this, indicator from internet or EA made with fxDreema?
Ok, I guess it is some EA. Then at least tell me which of your projects we are talking about. Just like that I can't even recognize this as an EA, how can I say what is located at row 156 position 43
-
-
do you have whole history in tester? try it with another metatrader (firstly download history, restart metatrader and try it again)
-
Well, I don't see arrays around row 156. This is somewhere in the middle of the OnInit() function, which is mostly the same for all generated EAs.
Are you sure that this error was produced by EA made with fxDreema? If yes... if it happens again, go to the row that is reported in the source code file (for example row 156), copy some code around this row and give it to me. I just can't find anything suspicious at this row right now.
I also put that EA for backtest (not profitable at all) and it finished without problems.
-
It seems to be an issue of data.
It works with controllpoints not with full dukascopy data. -
Well, error "array out of range" normally means some problem in the code. But again, I can't understand in which code this error appears

-
Remove #property strict if exists.
Fixed it for me, many thanks.
