As I understand it, FreezeLevel can poke it's nose into procedings unexpectedly because is Broker descretionary datum.
IF YOU find self in a Broker's imposed Freeze area - how will your code deal with this???
My first transient thought was to keep state memory and mark ticket as <TradeOperType>.pending, because not really wanting to get tied up in Sleep() retry loop when just want to Close or Delete, so each time period I would try again but never wait around in loop.
Why? code is managing many Market orders and having to effectively ignore potential issues with other Market orders is not seen as good idea.
The limitation related to closing of market orders is calculated on the basis of the correct market price used for closing of the order.
Order cannot be closed, if the execution price of its StopLoss or TakeProfit is within the range of freeze distance from the market price.
and same ref as above:
Pending orders BuyLimit, BuyStop, SellLimit and SellStop cannot be deleted, if the requested open price of the order is within the range of the freeze distance from the market price.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Needing some feedback.
.
As I understand it, FreezeLevel can poke it's nose into procedings unexpectedly because is Broker descretionary datum.
IF YOU find self in a Broker's imposed Freeze area - how will your code deal with this???
My first transient thought was to keep state memory and mark ticket as <TradeOperType>.pending, because not really wanting to get tied up in Sleep() retry loop when just want to Close or Delete, so each time period I would try again but never wait around in loop.
Why? code is managing many Market orders and having to effectively ignore potential issues with other Market orders is not seen as good idea.
.
Seems nebulous area because:
The limitation related to closing of market orders is calculated on the basis of the correct market price used for closing of the order.
Order cannot be closed, if the execution price of its StopLoss or TakeProfit is within the range of freeze distance from the market price.
and same ref as above:
Implying delaying tactics of some sort.
.
This then is what interested in knowing from you.
.
Thanks