I am new and I don't know if I have created the post in the right place.
My problem is that I have a script running and I have the following problem:
There are times when the script is trading I get the following error and the script stops working:
Buy order stop price must be above last trade price ExchangeRejectCode = 2061 affected Order: Buy 2 StopMarket @ 15133.75
The strategy 'xxxxxxx' has sent an order that has generated the following error 'Order rejected'. The strategy has sent cancellation requests, tried to close the position and terminated itself.
The question is that I have tried to fix the problem and I have not succeeded.
This is the last test I have done to try to solve the problem at the time of placing the entry.
if(High[0] - GetCurrentBid() < 4){
EnterLongStopMarket(0, true, 1, GetCurrentBid()+3, "MyEntry");
}else{
EnterLongStopMarket(0, true, 1, High[0], "MyEntry");
}
I hope someone can help me
Thank you very much

Comment