Page 1 of 1

OrderSend error 130

Posted: Thu Jul 21, 2022 8:40 pm
by tradingdelightful
Hello there,
i would like to backtest one ea that works in live,

but in bt i always get the OrderSend error 130.

is there a chance to add some fields for the minimum Stop Loss & Take Profit Limits
In the advanced tested GUI?

have a great day!
Max

Re: OrderSend error 130

Posted: Thu Jul 21, 2022 11:46 pm
by tickstory
Hi Max,

From what we understand, this "Order Send 130" error is essentially caused by your stop price being within STOP_LEVEL units (MarketInfo(Symbol(), MODE_STOPLEVEL)). Have you tried setting the "custom settings" by checking "Stops level" and setting a low number (see attached screenshot)? This should mean that your TP/SL price can be closer to the actual price. Also, make sure that you RefreshRates() just before you do your TP/SL calculations as this could also have bearing on the different behavior in live vs back-test.

Thanks and hope you have a great day also!

Re: OrderSend error 130

Posted: Fri Jul 22, 2022 1:19 am
by max12m3
Thank you for the fast reply but this didn't solved my issue.
Now a different EA and the same issue.
Stop level is 0.0

Re: OrderSend error 130

Posted: Fri Jul 22, 2022 1:49 am
by tickstory
Hi Max,

Have you tried printing out STOP_LEVEL? Have you tested to see what TP/SL actually works in your case (and what is the TP-CurrentPrice difference is)? It sounds like you'll need to determine exactly what is causing the error to trigger in your EA first.

Hope this helps.