mersni1: sometimes my EA takes a bid delay to respond. So that I should intervene to reinitialize or to reboot it manually. |
|
mersni1: sometimes my EA takes a bid delay to respond. So that I should intervene to reinitialize or to reboot it manually. |
|
First, thank you for your answer.
1. By "bid delay" I meant "big delay. Sorry for the typing error.
2. By "doesn't work" I meant: when I launch my EA on EURUSD graph for example to execute successive orders, the 1srt order is executed normally but the following ones take generally a certain delay (some minutes/hours, sometime no execution at all...)
3. I'm attaching herewith an example of mql4 file. Can you please check it on EURUSD graph with M1 timeframe. I would like just to add that I'm working with a powerful PC and an Optical Fiber connection.
Thank you for your help & Best Regards.
LM.
First, thank you for your answer.
1. By "bid delay" I meant "big delay. Sorry for the typing error.
2. By "doesn't work" I meant: when I launch my EA on EURUSD graph for example to execute successive orders, the 1srt order is executed normally but the following ones take generally a certain delay (some minutes/hours, sometime no execution at all...)
3. I'm attaching herewith an example of mql4 file. Can you please check it on EURUSD graph with M1 timeframe. I would like just to add that I'm working with a powerful PC and an Optical Fiber connection.
Thank you for your help & Best Regards.
LM.
extern bool FlagBuy=false; extern bool FlagSell=false; int OpenedOrder; // 1=Buy , 2=Sell int init(){ OpenedOrder=FALSE; // What does this mean to you? : // OpenedOrder==0 total==0 first time it opens a sell if ((!FlagSell) && (OpenedOrder!=2) && (TotalOrder(MagicNumber) < MaxOrders)) { OpenSell(); FlagSell=true; FlagBuy=false;} // next FlagSell=true, FlagBuy=false OpenedOrders==2 total=1 so it opens a buy if ((!FlagBuy) && (OpenedOrder!=1) && (TotalOrder(MagicNumber) < MaxOrders)) { OpenBuy(); FlagBuy=true; FlagSell=false; } // here FlagSell==false, FlagBuy==true OpenedOrders==1 total=2 // when an order (either a buy or sell) has closed (total=1 < 2=Max,) it opens another sell if ((!FlagSell) && (OpenedOrder!=2) && (TotalOrder(MagicNumber) < MaxOrders)) { // Two orders are open this never executes. if ((!FlagBuy) && (OpenedOrder!=1) && (TotalOrder(MagicNumber) < MaxOrders)) {

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear All,
I started using the MT4 platform developing my personal EA recently. Now, they are working well especially with the backtest facility.
But the problem I'm facing is when my EA is working on real time with my broker (practice or live) accounts: sometimes my EA takes a bid delay to respond. So that I should intervene to reinitialize or to reboot it manually.
So, I would be very grateful if someone knows the problem and can help me.
Regards.
LM.