How do "you" handle Freezelevel Limitations and Possibility for Your Market Order Violating FreezeLevel

 

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:

ref: https://book.mql4.com/trading/orders

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.

Implying delaying tactics of some sort.

.

This then is what interested in knowing from you.

.

Thanks

Reason: