Thank you, I will, but don't know why account details are relevant if it fails in MT4 Strategy Tester that has absolutely independent settings, in particular allows to set a spread, balance, etc. that have nothing to do with real market and account type.
I'm aware about 2-step order brokers and tried both approaches.
=============
if (type== OP_SELL ) {
P= Bid;
//TP= OP- PipToPrc(OC);
if (TakeProfit> 0) {
TP = P- PipToPrc(TakeProfit);
} else
TP= 0;
P= NormFXPrice(P); TP= NormFXPrice(TP); SL= NormFXPrice(SL);
if (TwoStepOrder) {
T= OrderSend( Symbol(), OP_SELL, LotSize, P, 3, 0, 0);//, OrdComm, MagicNumber, 0, SellColor);
Sleep(DELAY);
if (T< 1) {
PrintOrderError(T, "2-step OrderSend error ", GetLastError(), P, Bid, 0, 0);
} else {
if ( !OrderModify(T, OrderOpenPrice(), SL, TP, SellColor) )
PrintOrderError(T, "OrderModify error ", GetLastError(), P, Bid, SL, TP);
}
} else {
T= OrderSend( Symbol(), OP_SELL, LotSize, P, 3, SL, TP);
if (T< 1)
Print("OrderSend SELL error: "+ ErrorDescription(GetLastError())+ ", P="+ PrcToStr(P)+ ", Bid="+ PrcToStr(Bid)+ ", SL="+ PrcToStr(SL)+ ", "+"TP="+ PrcToStr(TP)+ ", Lot="+ LotSize);
}
}