Hi
entry price of Sell limit must higher Ask + MarketInfo(_Symbol,MODE_STOPLEVEL)
Hi guys i have a big long script , in practical this script create a edit box in chart i insert a price inside at this edit box and after i press button it should send a sell limit but return me error invalid price 1.05414460 for OrderSend function, Obviously the price when i push button is 1.05333 less than my value , i send my part of code if anyone can look if exist some error , is welcome , thanks
i think , i have compose ordersend in good mode anyone can confirm ? thanks , i tryed to use normilizedouble 5 in price but i have the same effect
Try this
OrderSend(Symbol(), OP_SELLLIMIT, StringToDouble(BT2Lotto), NormalizeDouble(StringToDouble(BT2PriceInsert_2),_Digits), 3, 0, 0, Magik+"_OCO_Sell2LMT", Magik, clrNONE, clrNONE);
OrderSend(Symbol(), OP_SELLLIMIT, StringToDouble(BT2Lotto), NormalizeDouble(StringToDouble(BT2PriceInsert_2),_Digits), 3, 0, 0, Magik+"_OCO_Sell2LMT", Magik, clrNONE, clrNONE);
2023.10.13 13:42:09.119 OCO_EA EURUSD,M1: orderSendReliable(): Permanent Error: 130 invalid stops. giving up.
yea i just try also with ask and also (BT2PriceInsert_1 > MarketInfo(Symbol(), MODE_BID)) and also (BT2PriceInsert_1 > MarketInfo(Symbol(), MODE_ASK)) in this mode but not work , not work2023.10.13 13:42:09.119 OCO_EA EURUSD,M1: orderSendReliable(): Permanent Error: 130 invalid stops. giving up.
yea i just try also with ask and also (BT2PriceInsert_1 > MarketInfo(Symbol(), MODE_BID)) and also (BT2PriceInsert_1 > MarketInfo(Symbol(), MODE_ASK)) in this mode but not work , not workYou sent 0,0 sl,tp and it says invalid stops ?
What is the MarketInfo(_Symbol,MODE_STOPLEVEL) ?
Is the price distance less than the figure above ?
Also increase the slippage
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys i have a big long script , in practical this script create a edit box in chart i insert a price inside at this edit box and after i press button it should send a sell limit but return me error invalid price 1.05414460 for OrderSend function, Obviously the price when i push button is 1.05333 less than my value , i send my part of code if anyone can look if exist some error , is welcome , thanks
i think , i have compose ordersend in good mode anyone can confirm ? thanks , i tryed to use normilizedouble 5 in price but i have the same effect