Double entry at the same point

 

How to add the entry in the same position when the price of the lot provided the brokerdoes not exist?


Example: If a broker lot maximum of 100. We wanted to order 150, then the EA will put up 75 and 75 double entry!

Thanks

 
Just open two or more orders in a loop. From my code
    // If a trade size is bigger than maxlot, it must be split.
    double  lotStep     = MarketInfo(chart.symbol, MODE_LOTSTEP),   //IBFX= 0.1
            maxLot      = MarketInfo(chart.symbol, MODE_MAXLOT );   //IBFX=50.0
    for(int nSplit=MathCeil(lotsNew/maxLot); nSplit>0; nSplit--){
        double size = MathRound(lotsNew/lotStep/nSplit)*lotStep;
        lotsNew -= size;                            #define NO_EXPIRATION 0
        if (GetTradeContext() < TC_LOCKED){         // 100.1 =33.34+33.34+33.33
            CallAgain(Bid,"gtc");   break;  }       //  99.99=50.00+49.99
        OOP = Bid+bid.to.open;                      // Update for each openSend.
        int ticket = OrderSend(...
 
asepedun85:

How to add the entry in the same position when the price of the lot provided the brokerdoes not exist?


Example: If a broker lot maximum of 100. We wanted to order 150, then the EA will put up 75 and 75 double entry!

Thanks

What! My mini-account has a 2 lot maximum. Fair enough. My standard account has 99999 lots maximum. Are you sure you mean lots = 100,000 units of base currency? And you want more than 100 at a time from an EA? I think if you could muster that much margin you might get a bit of slippage.
 
WHRoeder:
Just open two or more orders in a loop. From my code

Thanks for your helps...
Reason: