Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 922

 
Alexandr Sokolov:

Will the EA close half of the order if the market price is within the range of SYMBOL_TRADE_FREEZE_LEVEL from the SL or TP? MQL4

I would check it myself, but at Alpari this value is zero everywhere (on currencies, metals, crypto, indices)

To close, only the closing price of the order (for Buy - Bid and Sell - Ask ) and the volume of the order closure are important - if they are correct then there is only a technical check for requotes or a connection failure ...

the parameter SYMBOL_TRADE_FREEZE_LEVEL itself, it is bound only to a Take and Stop Loss - no closer than this value can move TP/SL and pending orders (seems only Limit ?) can not be put closer than this parameter

ZS: on alps it's not clear at all what and how it works - they've gone too far! open a demo on metaquotes - there everything always works as described in the help

 
Igor Makanu:

If the values are correct, then the only thing that matters is the order closing price (for Buy - Bid and Sell - Ask ) and the closing volume - if so, then technically check for requotes or a connection failure...

the parameter SYMBOL_TRADE_FREEZE_LEVEL itself, it is bound only to a Take and Stop Loss - no closer than this value can move TP/SL and pending orders (seems only Limit ?) can not be put closer than this parameter

ZS: alps has no idea what works and how it works - they have made too much trouble. open a demo on metaquotes - there everything always works as described in the help

Is there another MT4 by MetaQuotes? I searched once, but all the links were to download MT5

 
Alexandr Sokolov:

Is there still an MT4 from MetaQuotes? I used to look for it, but all the links led to downloading MT5

Do you download a separate terminal for each broker? - Of course this is a good idea, but you have to stop somewhere )))

When you open a demo in any MT4, go to "Navigator", right-click on the account and enter MetaQuotes at the bottom and you will open a demo without downloading the terminal from your broker

 
Igor Makanu:

Do you download a separate terminal for each broker? - Of course you need to do that, but you have to stop somewhere ))))

You can open a demo without downloading the terminal from the broker in any MT4 by right-clicking "Navigator" on the accounts and at the bottom enter MetaQuotes.

Of course not )) But somehow I did not think that MT4 demo accounts from MetaQuotes are still serviced

Thank you!

 
Igor Makanu:

If the values are correct, then the only thing that matters is the order closing price (for Buy - Bid and Sell - Ask ) and the closing volume - if so, then technically check for requotes or a connection failure...

the parameter SYMBOL_TRADE_FREEZE_LEVEL itself, it is bound only to a Take and Stop Loss - no closer than this value can move TP/SL and pending orders (seems only Limit ?) can not be put closer than this parameter

ZZZIE: alps has no idea how and what works - they've gone too far! open a demo on Metacquotes - everything always works there as described in the help

Maybe confused with SYMBOL_TRADE_STOPS_LEVEL

 
Alexey Viktorov:

Maybe you are confused with SYMBOL_TRADE_STOPS_LEVEL

Well, yes I did, but in this particular case - closing an order is still not taken into account

Here is a good table for using SYMBOL_TRADE_FREEZE_LEVEL

https://www.mql5.com/ru/articles/2555#modify_in_freeze_level_prohibited

 
Alexey Viktorov:

Maybe confused with SYMBOL_TRADE_STOPS_LEVEL

The freeze level will not allow modifying or deleting a stop or limit order if the price is closer to them than the level specified in SYMBOL_TRADE_FREEZE_LEVEL. Stop Loss and Take Profit are just those. I.e. no one prevents you from closing the position, most likely.
Although... Perhaps, they will not let a position be partially closed either - they will say that the price is close and the entire position will be closed by a stop order.
In practice, I have never encountered a freezing level.

 
Artyom Trishkin:

In practice I have never encountered a freeze level.

before they were equal at almost all brokers, it was enough to check either SYMBOL_TRADE_STOPS_LEVEL or SYMBOL_TRADE_FREEZE_LEVEL , all the same and the same errors will occur if the server did not allow to modify the order (error 130? )

Checked with Metacquot now:

2019.07.19 21:28:48.083 t1 EURUSD,H1: SYMBOL_TRADE_STOPS_LEVEL = 8

2019.07.19 21:28:48.083 t1 EURUSD,H1: SYMBOL_TRADE_FREEZE_LEVEL = 0

checked with a robot... - Both values = 0 , i.e., the server specification needs to be read, how and why they will requote )))
 
Igor Makanu:

checked with robot... - both values there = 0 , i.e. you need to read the server datasheet, how and for what reason they will requote )))

As far as I remember, 0 means the parameter is "floating", which means it will be applied when they want it (and will be applied as much as they want it)

 
Alexey Viktorov:

Maybe confused with SYMBOL_TRADE_STOPS_LEVEL

No, not confused. SYMBOL_TRADE_STOPS_LEVEL is the minimum distance of SL or TP from the market price at the moment of setting or changing

And SYMBOL_TRADE_FREEZE_LEVEL prohibits changing of SL or TP levels, if the market price is closer to them at that moment than SYMBOL_TRADE_FREEZE_LEVEL

It's just that I am writing an EA whose strategy was originally recommended on M1 and SYMBOL_TRADE_FREEZE_LEVEL can prohibit to close part of an order

Reason: