Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 4 Script | Error_Break_Script_V2 - This script is a general example of using error brake in any strategy - Break on Code Error Sample Strategy

Error_Break_Script_V2 revised

Version 1 - Error_Break_Script_V1 Deleted

Fixed implementation in Version2:

//+------------------------------------------------------------------+

//| Break_On_Error                                                        |

//+------------------------------------------------------------------+

int Break_On_Error(){

    int error_code = GetLastError();

    string error_string = ErrorDescription(error_code);

    Print("Error : ", error_string," ",error_code);

    return error_code;

}

//+------------------------------------------------------------------+

Tested successfully:

MetaTrader Experts, Indicators, Scripts and Libraries

MetaTrader Experts, Indicators, Scripts and Libraries

48803