Position or Order can't be modified, canceled or closed, when |price - sl| <= Freeze_Level, |price - tp| <= Freeze_level for Positions, and |price - openprice| <= Freeze_Level for Orders.
Funny, but almost 2 years after, I have to ask another question in my own topic :) Nevertheless:
I understand and can easily imagine that e.g. SL/TP modification or order modification or deletion could be frozen when:
|price - sl| <= Freeze_Level, |price - tp| <= Freeze_level for Positions, and |price - openprice| <= Freeze_Level for Orders.
However, does this also apply to other position related operations (e.g. closing)? Because if yes, than such a situation could easily occur: market price is very close to the position price, you want to close the position, but you're not allowed - and this would be very unfavourable for the trader. MetaQuotes, could you please clarify?
- www.mql5.com
Funny, but almost 2 years after, I have to ask another question in my own topic :) Nevertheless:
I understand and can easily imagine that e.g. SL/TP modification or order modification or deletion could be frozen when:
|price - sl| <= Freeze_Level, |price - tp| <= Freeze_level for Positions, and |price - openprice| <= Freeze_Level for Orders.
However, does this also apply to other position related operations (e.g. closing)? Because if yes, than such a situation could easily occur: market price is very close to the position price, you want to close the position, but you're not allowed - and this would be very unfavourable for the trader. MetaQuotes, could you please clarify?
Hi Enigma71fx,
Yes it's also for closing position - not just deleting or modifying.
You just know that now ?, It's all been there for years in MT4 too. Click MQL4's MarketInfo and MarketInfo's standard constant - the very bottom is MODE_FREEZELEVEL.
Very rare broker use both SYMBOL_TRADE_FREEZE_LEVEL and SYMBOL_TRADE_STOPS_LEVEL, usually they only use SYMBOL_TRADE_STOPS_LEVEL.
And it is also freaking annoying ! as we helpless with our position.
Hi Enigma71fx,
Yes it's also for closing position - not just deleting or modifying.
You just know that now ?, It's all been there for years in MT4 too. Click MQL4's MarketInfo and MarketInfo's standard constant - the very bottom is MODE_FREEZELEVEL.
Once again - how are you sure? Did you empirically check it yourself or are you guessing?
Because what you wrote is exactly in the contrary to below article:
http://mqlmagazine.com/mql-programming/accessing-market-data-in-mql5/
Which states that it is only used for orders:
SYMBOL_TRADE_FREEZE_LEVEL | Order freeze level in points. If the execution price lies within the range defined by the freeze level, the order cannot be modified, cancelled or closed. | int |
- mqlmagazine.com
Once again - how are you sure? Did you empirically check it yourself or are you guessing?
Because what you wrote is exactly in the contrary to below article:
http://mqlmagazine.com/mql-programming/accessing-market-data-in-mql5/
Which states that it is only used for orders:
SYMBOL_TRADE_FREEZE_LEVEL | Order freeze level in points. If the execution price lies within the range defined by the freeze level, the order cannot be modified, cancelled or closed. | int |
Hi Enigma71fx,
1. The correct one will be like this : if open price lies within Ask + FREEZE_LEVEL or Bid - FREEZE_LEVEL, then we can't close, delete, or modify. [Edit : Open price +/- FREEZE LEVEL. See below https://www.mql5.com/en/forum/2574#comment_315697]
2. No, I don't empirically check it - I had experience with it with several broker - annoying. Just find a broker (MT4 or MT5) with FREEZE_LEVEL value not zero, then try to trade with it. They usually not an ECN and have very bad liquidity provider. On most of them, slippage does not help either. So when position get opened, we can only close/delete outside FREEZE_LEVEL range.
3. BTW, your question was :
Enigma71fx:
....
However, does this also apply to other position related operations (e.g. closing)? Because if yes, than such a situation could easily occur: market price is very close to the position price, you want to close the position, but you're not allowed - and this would be very unfavourable for the trader. MetaQuotes, could you please clarify?
and it's not contrary with my answer or your another answer
Yes it's also for closing position - not just deleting or modifying.
...
http://mqlmagazine.com/mql-programming/accessing-market-data-in-mql5/
Which states that it is only used for orders:
SYMBOL_TRADE_FREEZE_LEVEL | Order freeze level in points. If the execution price lies within the range defined by the freeze level, the order cannot be modified, cancelled or closed. |
Which one is contrary ?!?
4. Hope someone else if the forum also reply.
BTW, I like your choice of words - empirically check it - I haven't hear that for years. Hope you don't mind I say that.
- www.mql5.com
and it's not contrary with my answer or your another answer
Which one is contrary ?!?
The fact that you write about positions as well, and the site that I quoted only mentions order. That's where is the main difference in opinions.
So basically you say that you experienced such situation with some brokers that when FREEZE_LEVEL was different than zero, you had to close position at much worse price?? I mean - with costs of closing bigger by at least FREEZE_LEVEL. Because if yes, it would be almost the same as trading on a much bigger spread.
EDIT:
I just found a following thing in the documentation:
10029
Order or position frozen
So it probably answers my question.
The fact that you write about positions as well, and the site that I quoted only mentions order. That's where is the main difference in opinions.
So basically you say that you experienced such situation with some brokers that when FREEZE_LEVEL was different than zero, you had to close position at much worse price?? I mean - with costs of closing bigger by at least FREEZE_LEVEL. Because if yes, it would be almost the same as trading on a much bigger spread.
EDIT:
I just found a following thing in the documentation:
10029
TRADE_RETCODE_FROZEN
Order or position frozen
So it probably answers my question.
Hi Enigma71fx,
1. I have to correct myself, coz I made mistake earlier. STOP_LEVEL is Ask + STOP_LEVEL and Bid - STOP_LEVEL, while FREEZE_LEVEL is open price +/- FREEZE_LEVEL. My apology for this.
2. FREEZE_LEVEL is "... if the execution price lies within the range defined by the freeze level, the order cannot be modified, canceled or closed. ... ".
For example, We open EURUSD at 1.23456 and freeze level is 20. That mean we can not close/delete/modify if the Ask/Bid is within 1.23476 (1.23456 + 20 point) and 1.23436 (1.23456 - 20 Point).
3. No - the spread stay. We still can close on TP and SL as long as TP and SL is outside open price +/- FREEZE_LEVEL.
Hi Enigma71fx,
1. I have to correct myself, coz I made mistake earlier. STOP_LEVEL is Ask + STOP_LEVEL and Bid - STOP_LEVEL, while FREEZE_LEVEL is open price +/- FREEZE_LEVEL. My apology for this.
2. FREEZE_LEVEL is "... if the execution price lies within the range defined by the freeze level, the order cannot be modified, canceled or closed. ... ".
For example, We open EURUSD at 1.23456 and freeze level is 20. That mean we can not close/delete/modify if the Ask/Bid is within 1.23476 (1.23456 + 20 point) and 1.23436 (1.23456 - 20 Point).
3. No - the spread stay. We still can close on TP and SL as long as TP and SL is outside open price +/- FREEZE_LEVEL.
Ad.2. I guess that after my previous post we can now fully agree that it should be: the order cannot be modified, canceled or closed and the position cannot be modified or closed.
Ad.3. On SL or TP - sure, but if you want to close by market order, it means that you cannot do it. Thus, you have to either wait for the price to hit SL/TP or send pending order outside open price +/- FREEZE_LEVEL. Which basically means that you have to bare additional cost of closing the position (that's why I compared it to bigger spread).
Ad.2. I guess that after my previous post we can now fully agree that it should be: the order cannot be modified, canceled or closed and the position cannot be modified or closed.
Ad.3. On SL or TP - sure, but if you want to close by market order, it means that you cannot do it. Thus, you have to either wait for the price to hit SL/TP or send pending order outside open price +/- FREEZE_LEVEL. Which basically means that you have to bare additional cost of closing the position (that's why I compared it to bigger spread).
Hi Enigma71fx,
> 2. Well, we can put it that way :).
> 3. Yes. I wrote #3 in hurry :( .
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
A question to MQL5 language creators - what is a purpose of a following property? When should it be used? Any examples really appreciated.
SYMBOL_TRADE_FREEZE_LEVEL
Distance to freeze trade operations in points
int
Regards,
Pawel W.