After the auto update of MT4 my EAs doesn’t play at all.
No Errors No Warnings, it just doesn’t start.
What should I do and were should i look for further instructions about the language?
Which command or condition within your code does-not get executed?
2014.02.16 18:27:24.240 2011.01.02 23:00 Testing pass stopped due to a critical error in the EA
2014.02.16 18:27:24.240 2011.01.02 23:00 array out of range in 'Dvrg Exploitation v4_4.mq4' (542,36)
int init() { //--- Dvrg Exploitation --------------------------------------- int i,z; for (i=0; i<=9; i++) { pos_divergence[i] = 0; neg_divergence[i] = 0; long_scalp_order_again[i] = 1; short_scalp_order_again[i] = 1; } close_long_dvrg = 0; close_short_dvrg = 0; long_order_again_1D= 1; short_order_again_1D = 1; long_HS_order_again_1D = 1; short_HS_order_again_1D = 1; long_FHS_order_again_1D = 1; short_FHS_order_again_1D = 1; cross_long_order_again_1D = 1; cross_short_order_again_1D = 1; //--- Swinger v2_2-11 ----------------------------------------- label_4H = 1; blind_long_4H = 0; blind_short_4H = 0; long_non_failure_4H = 0; short_non_failure_4H = 0; order_again_long_4H = 1; order_again_short_4H = 1; long_safe_enviroment = 0; short_safe_enviroment = 0; no_other_long_orders_4H = 1; no_other_short_orders_4H = 1; for (i=0; i<=99; i++) for (z=0;z<=9; z++) { long_orders_array_ATF[i][z]=0; short_orders_array_ATF[i][z]=0; }// This is the array read_variables(); return(0); }
And how is that supposed to help?
- Don't show us the declaration and we can't see how big the arrays are.
- Don't show us the definition of read_variables() (I assume it fills in your arrays.)
- Don't show us where you use the arrays.
int long_orders_array_ATF[100][10], short_orders_array_ATF[100][10]
I am confused.
The Debug tab takes me to line 120.
But the terminal’s journal take’s me to 553,36.
2014.02.16 18:27:24.240 2011.01.02 23:00 Testing pass stopped due to a critical error in the EA
2014.02.16 18:27:24.240 2011.01.02 23:00 array out of range in 'Dvrg Exploitation v4_4.mq4' (542,36)
int long_orders_array_ATF[100][10], short_orders_array_ATF[100][10] int init() { //--- Dvrg Exploitation --------------------------------------- int i,z; for (i=0; i<=9; i++) { pos_divergence[i] = 0; neg_divergence[i] = 0; long_scalp_order_again[i] = 1; short_scalp_order_again[i] = 1; } close_long_dvrg = 0; close_short_dvrg = 0; long_order_again_1D= 1; short_order_again_1D = 1; long_HS_order_again_1D = 1; short_HS_order_again_1D = 1; long_FHS_order_again_1D = 1; short_FHS_order_again_1D = 1; cross_long_order_again_1D = 1; cross_short_order_again_1D = 1; //--- Swinger v2_2-11 ----------------------------------------- label_4H = 1; blind_long_4H = 0; blind_short_4H = 0; long_non_failure_4H = 0; short_non_failure_4H = 0; order_again_long_4H = 1; order_again_short_4H = 1; long_safe_enviroment = 0; short_safe_enviroment = 0; no_other_long_orders_4H = 1; no_other_short_orders_4H = 1; for (i=0; i<=99; i++) for (z=0;z<=9; z++) { long_orders_array_ATF[i][z]=0; short_orders_array_ATF[i][z]=0; } read_variables(); return(0); } void read_variables() { file_name = "Dvrg_Exploitation_v4_4_Trade_Data.csv"; file_handle = FileOpen(file_name,FILE_CSV|FILE_READ,'/'); if( file_handle > 0 ) { long_safe_enviroment = FileReadNumber(file_handle); short_safe_enviroment = FileReadNumber(file_handle); close_long_dvrg = FileReadNumber(file_handle); close_short_dvrg = FileReadNumber(file_handle); long_order_again_1D = FileReadNumber(file_handle); short_order_again_1D = FileReadNumber(file_handle); long_HS_order_again_1D = FileReadNumber(file_handle); short_HS_order_again_1D = FileReadNumber(file_handle); long_FHS_order_again_1D = FileReadNumber(file_handle); short_FHS_order_again_1D = FileReadNumber(file_handle); cross_long_order_again_1D = FileReadNumber(file_handle); cross_short_order_again_1D = FileReadNumber(file_handle); long_non_failure_4H = FileReadNumber(file_handle); short_non_failure_4H = FileReadNumber(file_handle); order_again_long_4H = FileReadNumber(file_handle); order_again_short_4H = FileReadNumber(file_handle); no_other_long_orders_4H = FileReadNumber(file_handle); no_other_short_orders_4H = FileReadNumber(file_handle); long_safe_non_failure_4H = FileReadNumber(file_handle); short_safe_non_failure_4H = FileReadNumber(file_handle); order_again_long_safe_4H = FileReadNumber(file_handle); order_again_short_safe_4H = FileReadNumber(file_handle); no_other_long_safe_orders_4H = FileReadNumber(file_handle); no_other_short_safe_orders_4H = FileReadNumber(file_handle); FileClose(file_handle); } file_handle_array=FileOpen("pos_divergence.dat", FILE_BIN|FILE_WRITE); if ( file_handle_array > 0 ) {FileReadArray(file_handle_array, pos_divergence, 0, 10); FileClose(file_handle_array);} file_handle_array=FileOpen("neg_divergence.dat", FILE_BIN|FILE_WRITE); if ( file_handle_array > 0 ) {FileReadArray(file_handle_array, neg_divergence, 0, 10); FileClose(file_handle_array);} file_handle_array=FileOpen("long_orders_array_ATF.dat", FILE_BIN|FILE_WRITE); if ( file_handle_array > 0 ) {FileReadArray(file_handle_array, long_orders_array_ATF, 0, 10000); FileClose(file_handle_array);} file_handle_array=FileOpen("short_orders_array_ATF.dat", FILE_BIN|FILE_WRITE); if ( file_handle_array > 0 ) {FileReadArray(file_handle_array, short_orders_array_ATF, 0, 10000); FileClose(file_handle_array);} file_handle_array=FileOpen("ds_array_ATF.dat", FILE_BIN|FILE_WRITE); if ( file_handle_array > 0 ) {FileReadArray(file_handle_array, ds_array_ATF, 0, 80); FileClose(file_handle_array);} } void check_orders_sl_tp() { int i, z; for( i=0; i<=orders_total(); i++ ) for( z=0; z<=9; z++ ) { if ( long_orders_array_ATF[i][z] > 0 ) if ( Order_Select(long_orders_array_ATF[i][z],"History") == long_orders_array_ATF[i][z] ) { if( OrderSymbol()==Symbol() && OrderClosePrice()==OrderStopLoss() ) { if( long_orders_array_ATF[i][0] == OrderTicket()) { long_orders_array_ATF[i][0] = 0; no_other_long_orders_4H = 1; order_again_long_4H = 1;} if( long_orders_array_ATF[i][1] == OrderTicket()) { long_orders_array_ATF[i][1] = 0; order_again_long_4H = 1;} if( long_orders_array_ATF[i][2] == OrderTicket()) { long_orders_array_ATF[i][2] = 0; long_order_again_1D= 1; set_enviroment(0,"long",3);} if( long_orders_array_ATF[i][3] == OrderTicket()) { long_orders_array_ATF[i][3] = 0; cross_long_order_again_1D = 1; set_enviroment(0,"long",4);} if( long_orders_array_ATF[i][4] == OrderTicket()) { long_orders_array_ATF[i][4] = 0; long_HS_order_again_1D = 1; set_enviroment(0,"long",2);} if( long_orders_array_ATF[i][5] == OrderTicket()) { long_orders_array_ATF[i][5] = 0; long_FHS_order_again_1D = 1; set_enviroment(0,"long",1);} if( long_orders_array_ATF[i][6] == OrderTicket()) { long_orders_array_ATF[i][6] = 0; order_again_long_4H = 0; no_other_long_orders_4H = 0; long_non_failure_4H = 0;} if( long_orders_array_ATF[i][7] == OrderTicket()) { long_orders_array_ATF[i][7] = 0; order_again_long_4H = 0; no_other_long_orders_4H = 0;} if( long_orders_array_ATF[i][8] == OrderTicket()) { long_orders_array_ATF[i][8] = 0; order_again_long_4H = 0; no_other_long_orders_4H = 0; long_non_failure_4H = 0;} }.........
if ( long_orders_array_ATF[i][z] > 0 )
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
After the auto update of MT4 my EAs doesn’t play at all.
No Errors No Warnings, it just doesn’t start.
What should I do and were should i look for further instructions about the language?