Check SYMBOL_TRADE_FREEZE_LEVEL in this article.
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
- www.mql5.com
To obtain the current market information there are several functions: SymbolInfoInteger() , SymbolInfoDouble() and SymbolInfoString() . The first...
Thank you for the answer.
I tried with
Print(SymbolInfoInteger(Symbol(),SYMBOL_TRADE_FREEZE_LEVEL)) ;
but the result is zero.
Alberto Tortella #:
SYMBOL_TRADE_FREEZE_LEVEL
SYMBOL_TRADE_FREEZE_LEVEL
Print(SYMBOL_TRADE_FREEZE_LEVEL) ;
This is the way you should use it. It is points value. Check the article.
Type of order/position | Activation price | Check |
---|---|---|
Buy Limit order | Ask | Ask-OpenPrice >= SYMBOL_TRADE_FREEZE_LEVEL |
Buy Stop order | Ask | OpenPrice-Ask >= SYMBOL_TRADE_FREEZE_LEVEL |
Sell Limit order | Bid | OpenPrice-Bid >= SYMBOL_TRADE_FREEZE_LEVEL |
Sell Stop order | Bid | Bid-OpenPrice >= SYMBOL_TRADE_FREEZE_LEVEL |
Buy position | Bid | TakeProfit-Bid >= SYMBOL_TRADE_FREEZE_LEVEL Bid-StopLoss >= SYMBOL_TRADE_FREEZE_LEVEL |
Sell position | Ask | Ask-TakeProfit >= SYMBOL_TRADE_FREEZE_LEVEL StopLoss-Ask >= SYMBOL_TRADE_FREEZE_LEVEL |
The checks a trading robot must pass before publication in the Market
- www.mql5.com
Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi all, I'm trying to open a sell stop order with the following parameters
but I have error 4756.
If I try to place the stop order manually with same price and stop used by the expert, then the order is excecuted.
I verified entry price and stop respect the stop level,
Could you suggest how to investigate the reaosn of the error?
Thank you