Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Fixed it, now it works. Of course it's not right, but it works.
{ if(iTrailTakeProfit > 0.0) { tp=OrderTakeProfit() + NormalizeDouble(iTrailTakeProfit * Point(),_Digits); if(NormalizeDouble(((tp - OrderTakeProfit())) < 0.0,Digits))return; tp = OrderTakeProfit(); }else tp = 0.0; if(OrderProfit() + OrderSwap() + OrderCommission() > MarketInfo(Symbol(), MODE_TICKVALUE) * iTrailStart * OrderLots()); { if(((NormalizeDouble((Bid - OrderOpenPrice()*Point),Digits) >= NormalizeDouble(((Bid - NormalizeDouble((iTrailStart * Point),_Digits))),_Digits) > OrderStopLoss() || OrderStopLoss()==0)));//true { if((OrderStopLoss() == 0.0 && NormalizeDouble(Bid - OrderStopLoss()* Point,Digits) < NormalizeDouble((Bid - NormalizeDouble((iTrailDist * Point),_Digits)),_Digits)));//true { if(iTrailStep > 0.0 && OrderStopLoss() >= 0.0 && NormalizeDouble(((Bid - OrderStopLoss() - iTrailDist * Point)),Digits) >= iTrailStep);//true { sl_lev = NormalizeDouble((Bid - iTrailDist * Point()),_Digits); if(NormalizeDouble(Bid - sl_lev * Point,_Digits) < MarketInfo(Symbol(),MODE_STOPLEVEL));//false { if(!OrderModify(Forder,OrderOpenPrice(),NormalizeDouble(Bid - NormalizeDouble((iTrailStart * Point),_Digits),_Digits),tp,OrderExpiration())); Print("Не удалось модифицировать стоплосс ордера №",OrderTicket(),". Ошибка: ",GetLastError()); } } } } } }It doesn't set stops correctly, how do I fix it?
And look in the magazine to see what it turns out to be)
At first I didn't write anything, then I started looking sequentially and it turned out to be a lot.
Thank you.
Fixed it, now it works. It's not right, of course, but it works.
It doesn't set the stops right, how do you fix it?
Where are you getting this data from?
Where are you getting this data from?
From the warrant.
MQL5 will also immediately return
If the order is successfully accepted by the trade server, the OrderSend() function returns true.
Fixed it, now it works. It's not right, of course, but it works.
It sets stops wrong, how can I fix it?
OrderOpenPrice()*PointOrderStopLoss()* Point1,12500*Point=0.0000112500
1,12500*Point=0.0000112500
2021.12.15 00:26:55.086 2021.01.04 00:00:00 test1 EURUSD,M1: 1.22373
2021.12.15 00:30:09.557 2021.01.04 00:00:00 test1 EURUSD,M1: 1.2238e-05
OnTradeTransaction
2021.12.15 00:26:55.086 2021.01.04 00:00:00 test1 EURUSD,M1: 1.22373
2021.12.15 00:30:09.557 2021.01.04 00:00:00 test1 EURUSD,M1: 1.2238e-05
Read 3-4 posts