Expet initialization fails at random

 

Hi,

I'm debugging expert advisor and for unknown reason I get the following error at random:

2013.02.12 16:46:25    Experts    initializing of BreakOut (EURUSD,H1) failed

I'm confused because then when I wait a little while and try the debuggin again without any change in the code it works no problem. Is there a way to get the cause of the initialization failure?

Thanks!

Br, Candles

 
Candles:

Hi,

I'm debugging expert advisor and for unknown reason I get the following error at random:

2013.02.12 16:46:25    Experts    initializing of BreakOut (EURUSD,H1) failed

I'm confused because then when I wait a little while and try the debuggin again without any change in the code it works no problem. Is there a way to get the cause of the initialization failure?

Thanks!

Br, Candles


What is "BreakOut" ? is it an indicator and you trying to init it's handle ? if so, print the error may help, not sure if this help though :(

int handle;

int OnInit()
  {
  handle = iCustom("BreakOut",...
  if (handle == INVALID_HANDLE)
     {
     Print ("Fail to init handle BreakOut in OnInit ",GetLastError());
     ResetLastError();
     }
 
   return (0);// normal return
  }

void OnTick()
  {
  
  if (handle == INVALID_HANDLE) handle = iCustom("BreakOut",...
  if (handle == INVALID_HANDLE)
     {
     Print ("Fail to init handle BreakOut in OnTick ",GetLastError());
     ResetLastError();
     return;
     } 


  } 

 

 

That sounds like it might work. I'll give it a go later. Anyone know what is invalid in the stops of this buy stop order?:

2013.02.12 18:31:21    Trades    '12453': failed buy stop 0.10 EURUSD at 1.28920 (1.29175) sl: 1.27837 tp: 1.30175 [Invalid stops]

I also used stoplimit when doing the trade request, because it is required according to the MqlTradeRequest references.

 

I also face when i use fap turbo 57 version.

I found that 2013.02.14 18:37:00    Cannot open file 'D:\Program Files\MetaTrader - EXNESS\experts\indicators\zzf.ex4' on the GBPUSDm,Daily

I use fap turbo more then 1.5 years and still cant generate enough profit.its now better to leave those standard expart advispor and try to build something for my own.

Documentation on MQL5: File Functions / FileOpen
Documentation on MQL5: File Functions / FileOpen
  • www.mql5.com
File Functions / FileOpen - Documentation on MQL5
 
anik2050:

I also face when i use fap turbo 57 version.

I found that 2013.02.14 18:37:00    Cannot open file 'D:\Program Files\MetaTrader - EXNESS\experts\indicators\zzf.ex4' on the GBPUSDm,Daily

I use fap turbo more then 1.5 years and still cant generate enough profit.its now better to leave those standard expart advispor and try to build something for my own.


An .ex4 file is an mql4 program, so please ask your question in mql4 forum in here                                                        
MQL4: automated trading forum
  • www.mql5.com
MQL4: automated trading forum
 
Candles:

That sounds like it might work. I'll give it a go later. Anyone know what is invalid in the stops of this buy stop order?:

2013.02.12 18:31:21    Trades    '12453': failed buy stop 0.10 EURUSD at 1.28920 (1.29175) sl: 1.27837 tp: 1.30175 [Invalid stops]

I also used stoplimit when doing the trade request, because it is required according to the MqlTradeRequest references.

Maybe distance of placed stop order too close to price (i.e less than from stoplevel value). Please try to change the distance.
 
achidayat:
Maybe distance of placed stop order too close to price (i.e less than from stoplevel value). Please try to change the distance.
Actualy, Candles already solve that Strange invalid stops problem when placing pending buy stop order
 
achidayat:
Maybe distance of placed stop order too close to price (i.e less than from stoplevel value). Please try to change the distance.

Yeah I figured that one out :)

Thanks anyway :)

Br, Candles