Is it static or dynamic array (https://www.mql5.com/en/docs/array/arraysetasseries)?
If it is dynamic array could you provide source code?
- www.mql5.com
you have the source in the code sent you privately some days ago
it worked ok in 292
Look at this.
Create method of CLeadOsc contains:
if(!ArraySetAsSeries(iTmpArr,true)) { Print("CLeadOsc::Create(): ArraySetAsSeries error: "+string(GetLastError())); return (false); }
In line 204 you have declared array iTmpArray as:
double iTmpArr[1];
So you have static array.
https://www.mql5.com/en/docs/array/arraysetasseries
Note
The AS_SERIES flag can't be set for multi-dimensional arrays or static arrays (arrays, whose size in square brackets is preset already on the compilation stage). Indexing in timeseries differs from a common array in that the elements of timeseries are indexed from the end toeards the beginning (from the newest to oldest data).
You said that it had worked fine in 292 build. It was a bug, which was been fixed.
- www.mql5.com
Look at this.
Create method of CLeadOsc contains:
In line 204 you have declared array iTmpArray as:
So you have static array.
https://www.mql5.com/en/docs/array/arraysetasseries
You said that it had worked fine in 292 build. It was a bug, which was been fixed.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
When testing an ea, the last build 294 says:
2010.07.21 12:13:54 Core 1 CLeadOsc::Create(): ArraySetAsSeries error: 0
2010.07.21 12:13:54 Core 1 Tester stopped because OnInit failed
The code used which makes this stop in tester is this:
if(!ArraySetAsSeries(iTmpArr,true))
{
Print("CLeadOsc::Create(): ArraySetAsSeries error: "+string(GetLastError()));
return (false);
}
iTmpArr is a double array, legally stored as class member.
My big problem is that in prev build 292 I had no such problem; the code above did not produce error and the tester worked ok; now it stops.
Something changed in handling arrays as series ? Thank you
tek