array out of range error
-
what is wrong with the platform? newly exported EA are not responding to constant input value changes in real-time the EA freezes anytime this happens..populating this error type: array out of range in '65391-18647.mq4' (296,11)
WHY?you can sample check with the project
-
I know the admin is modifying the platform code because of an error I found some days ago. I have no idea if it is related to your issue or not. You'd better contact him to let him know just in case.
-
I have the same problem.
-
@tec-nacks @l-andorrà I've reached out to him already but no response.... if you possibly can, pls help do
-
Hi FXDreema team, @fxDreema
I'm encountering an issue with an EA generated by FXDreema, specifically an "array out of range" error in the OnChartEvent, OnTimer function.
This seems to happen when I switch timeframes, and I believe it’s related to the generated code rather than anything I’ve added.
Here’s the relevant code:void OnChartEvent( const int id, // Event ID const long& lparam, // Parameter of type long event const double& dparam, // Parameter of type double event const string& sparam // Parameter of type string events ) { //-- write parameter to the system global variables FXD_ONCHART.id = id; FXD_ONCHART.lparam = lparam; FXD_ONCHART.dparam = dparam; FXD_ONCHART.sparam = sparam; //-- run blocks int blocks_to_run[] = {39,52,60,62,64,66,68,70,72,74,76,78,80,81,85,86,88,90,92,94,96,101,115,127,131,137,139,142,143,150,156,163,165,177,185,187,191,202,213,221,226,229,231,237,249,251,255,258,263,269,282,284,290,301,303,309,320,322,334,343,349,356,359,367,374,381,419,425,463,465,468,469,470,471,472,476,477,570,572,573,599,600,602,604,606,608,610,611,612,617,618,619,623,624,625,629,630,633,634,635,639,642,643,662,668,669,672,673,674,678,679,682,684,686,688,690,692,693,694,698,699,704,705,744,745,754,772,774,776,778,780,782,784,786,788,828,830,832,834,858,861,862,863,864,889,892,895,897,903,941,963,965,969,971,973,976,978,980,992,997,1015,1017,1019,1025,1026,1028,1031,1033,1046,1066,1069,1082,1098,1153,1159,1163,1167,1171,1176,1177,1182,1188,1189,1190,1191,1196,1197,1198,1199,1204,1205,1206,1207,1211,1212,1213,1214,1219,1240,1242,1270,1271,1272,1273,1279}; Print(ArraySize(blocks_to_run)); Print("Size of _blocks_: ", ArraySize(_blocks_)); for (int i=0; i<ArraySize(blocks_to_run); i++) { _blocks_[blocks_to_run[i]].run(); } return; }To debug, I added some print statements:
Print(ArraySize(blocks_to_run)); returns 205, which seems correct.
Print("Size of blocks: ", ArraySize(blocks)); returns 1301 normally, but when I switch timeframes, it drops to 0, and that’s when the “array out of range” error occurs.I’m using MetaTrader 5. Could you please take a look and suggest a fix or workaround?
Thanks for your help! -
@alidavoodi the issue is from the admin... probably during a tweak to the platform
-
@tec-nacks
Thank youDo you know when this happened
Because I don't think it happened until yesterday... -
@alidavoodi yea, it started yesterday
-
@alidavoodi it has been fixed..admon responded
working now ..tested
-
@tec-nacks Thanks for letting me know
I'll test it now.