OrderSend error 130

Discussion of the latest application betas including reports of bugs, issues and suggestions before it is made available as a general release.
Post Reply
tradingdelightful
Posts: 6
Joined: Mon Oct 25, 2021 1:36 pm

OrderSend error 130

Post 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

tickstory
Posts: 4884
Joined: Sun Jan 06, 2013 12:27 am

Re: OrderSend error 130

Post 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!
Attachments
AT_StopsLevel.png

max12m3
Posts: 14
Joined: Sat May 28, 2022 8:55 pm

Re: OrderSend error 130

Post 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
Attachments
130.PNG

tickstory
Posts: 4884
Joined: Sun Jan 06, 2013 12:27 am

Re: OrderSend error 130

Post 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.

Post Reply