How do I modify an EA to use on an ECN Broker?
Does anybody have an example?
Thanks
How do I modify an EA to use on an ECN Broker?
Does anybody have an example?
Thanks
Hey rc....you could send the orders without a profittarget and stoploss.... Then modify the orders after set ....
Or you can utilize orderreliable2step.... You will need the include liborderreliable....
Both methods work perfectly.... Below is code from an ecn ea of mine for example...h
Inserted Code #include lt;LibOrderReliable.mqhgt; //--
//--
Inserted Code //--------------- if(CheckEntry(trendtimeframe) == 1 CountBuys(MagicNumber) == 0 CountSells(MagicNumber) == 0) OrderSendReliable2Step(Symbol(),OP_BUY,LotsOptimiz ed(),Ask,Slippage,Ask-((StopFactor*atr)*Stage), Ask ((ProfitFactor*atr)*Stage), ECN Buy, MagicNumber,0,Blue); if(CheckEntry(trendtimeframe) == -1 CountSells(MagicNumber) == 0 CountBuys(MagicNumber) == 0) OrderSendReliable2Step(Symbol(),OP_SELL,LotsOptimi zed(),Bid,Slippage,Bid ((StopFactor*atr)*Stage), Bid-((ProfitFactor*atr)*Stage), ECN Quotation, MagicNumber,0,Red); //--------------------
Its easy. Send all orders with NO TP/SL. On another line add the TP/SL with OrderModify();