expiry) { Print("YOUR ROBOT IS EXPIRED. ; ExpertRemove(); return(INIT_FAILED); } return(INIT_SUCCEEDED); } // Deinitialization void OnDeinit(const int reason) { // Deinitialization code (if needed) } // Expert Tick Function void OnTick() { // Your OnTick logic here // ... } // Additional Functions (if any) // ... //+------------------------------------------------------------------+ //| Helper Functions | //+------------------------------------------------------------------+ // The rest of your helper functions can be placed here, including // IsNewBar, IsNewBar_Buy, IsNewBar_Sell, TotalOrdersOnSymbol, etc. // ..." /> expiry) { Print("YOUR ROBOT IS EXPIRED. ; ExpertRemove(); return(INIT_FAILED); } return(INIT_SUCCEEDED); } // Deinitialization void OnDeinit(const int reason) { // Deinitialization code (if needed) } // Expert Tick Function void OnTick() { // Your OnTick logic here // ... } // Additional Functions (if any) // ... //+------------------------------------------------------------------+ //| Helper Functions | //+------------------------------------------------------------------+ // The rest of your helper functions can be placed here, including // IsNewBar, IsNewBar_Buy, IsNewBar_Sell, TotalOrdersOnSymbol, etc. // ..."> expiry) { Print("YOUR ROBOT IS EXPIRED. ; ExpertRemove(); return(INIT_FAILED); } return(INIT_SUCCEEDED); } // Deinitialization void OnDeinit(const int reason) { // Deinitialization code (if needed) } // Expert Tick Function void OnTick() { // Your OnTick logic here // ... } // Additional Functions (if any) // ... //+------------------------------------------------------------------+ //| Helper Functions | //+------------------------------------------------------------------+ // The rest of your helper functions can be placed here, including // IsNewBar, IsNewBar_Buy, IsNewBar_Sell, TotalOrdersOnSymbol, etc. // ..." />
have a mt5 ea its simple stop loss trail break even not a complex robot can any one fix it everytime i place it on the chart it disapears from it with this error
2023.12.07 14:17:20.779 Experts expert Advisor (USTEC,M15) loaded successfully2023.12.07 14:17:44.056 Experts initializing of Advisor (USTEC,M15) failed with code 12023.12.07 14:17:44.113 Experts expert Advisor (USTEC,M15) removed
thats the code below that i was given for it
//+------------------------------------------------------------------+//| ACCOUNT NUMBER LOCKER |//| & |//| ACCOUNT EXPIRY DATE |//+------------------------------------------------------------------+const long account_number = 5307342 ; // ENTER YOUR ACCOUNT NUMBERdatetime expiry = D'10.05.2023' ; // ENTER YOUR EXPIRY DATE- (DD.MM.YYYY)
// External Parametersinput double StopLoss_Pips = 10; // StopLoss in Pipsinput double BreakEvenPips = 5; // Breakeven (Pips)input double TrailStep_Pips = 1; // Trail Step (Pips)input double TrailStopPips = 1; // Trail SL (Pips)
// Other Parametersint Slippage = 3;double TrailingPrice_Buy = 0;double TrailingPrice_Sell = 0;
// Initializationint OnInit(){ // Licensing Check if(account_number == 0); else if(account_number != AccountInfoInteger(ACCOUNT_LOGIN)) { Print("YOUR ACCOUNT ISN'T ALLOWED. ExpertRemove(); return(INIT_FAILED); }
// Expiry Check if(TimeCurrent() > expiry) { Print("YOUR ROBOT IS EXPIRED. ; ExpertRemove(); return(INIT_FAILED); }
return(INIT_SUCCEEDED);}
// Deinitializationvoid OnDeinit(const int reason){ // Deinitialization code (if needed)}
// Expert Tick Functionvoid OnTick(){ // Your OnTick logic here // ...}
// Additional Functions (if any)// ...
//+------------------------------------------------------------------+//| Helper Functions |//+------------------------------------------------------------------+// The rest of your helper functions can be placed here, including// IsNewBar, IsNewBar_Buy, IsNewBar_Sell, TotalOrdersOnSymbol, etc.// ...
Success story sharing