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
OrderSend error 130
Re: OrderSend error 130
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!
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
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
Now a different EA and the same issue.
Stop level is 0.0
Re: OrderSend error 130
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.
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.