Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Error_Break_Script_V2 - This script is a general example of using error brake

author EAcpu | 6 reads | 0 comments |

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

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

Error_Break_Script_V2 revision

Version 1 - Error_Break_Script_V1 Removed

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;

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

Test successful:

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

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


Attachment download

📎 error_break_script_v2.mq4 (10.56 KB)

Source: MQL5 #48803

Verification code Refresh