Help. How to modify this EA for placing orders???

 

Hello there.


Please I need some help regarding the modification of orders. I have an EA that do scalps it places orders as market orders whith a calculated take profit and a calculated stop loss on it.

However, now I´m moving to MBTrading which can´t handle market orders whith those parameters. In this broker this should be done in two stages one place the market order and second modifys the order to set stops and tp...

But for me it is kind of hard to how to do it...may someone help me...How I should modyfy this parameter??


Here is the example of how it sets order now:


if (NeedSendBuy)
{
tp = 0;
if (!Virtual_TP) tp = Ask + TakeProfit * Point;
OrderSend(Symbol(),OP_BUY,LT,Ask,slippage,Ask - StopLoss * Point,tp,"Scalper EA",MagicNumber,0,Green);
NeedSendBuy = false;
NeedSendSell = true;
}


I belive I should change the market order to something like this..:

OrderSend(Symbol(),OP_BUY,LT,Ask,slippage,0,0,"Scalper EA",MagicNumber,0,Green);
And add something that after order sucessfull modify it to:

OrderModify(OrderTicket(), OrderOpenPrice(), OrderOpenPrice() - StopLoss * Point, tp, OrderExpiration(), CLR_NONE);


Any help pls...

Thanks a lot...I´m newbie on this