Lady - Сandle. Candle directional indicator, quote gap. -MetaTrader 5 Script- MT4/MT5 Resources


Comparison of open and close prices often does not correctly assess the direction of the candle.


The indicator determines the direction of the bar based not only on the open/close prices.
Gaps and gaps in quotes are also identified.
Comparison of open and close prices often does not correctly assess the direction of the candle.
If the body size exceeds 2/3 of what it would otherwise be, they can be constructed differently to assess. This indicator adopts the author's empirical approach to this problem.
During the calculation of the indicator, some statistical characteristics of some quotes are evaluated. The result description structure TCandlesStats. Calculate the size of the boundary minimum and maximum candles, as well as the approximate size of the "average" or "normal" candle. Assessment is based on the height of the candle and the height of its body.
The results of the calculation are displayed in the terminal log. The calculation is performed on a fixed-size window of data and is repeated when passing at least 1/3 of its size.
This ensures that the results are up to date at the time of calculation.
Quotation gaps (large gaps) are estimated using statistical estimates of the size of the largest candle.
It would be more correct to use a price deviation channel and open prices beyond that channel.
However, defining this channel correctly is much more difficult.
When calculating the indicator, the TCandleInfo structure is calculated for each bar.
The meaning of the fields is clear from the comments. This calculation is implemented as a macro.
The chart displays information about bar directions and gaps in quotes.
You can turn off the direction display.
You can only display the adjusted candlestick direction.
Gaps can be filtered by their size. Whitespace within quotation marks is always displayed.
Icons shown by value are low - candles are downward (red), upward (yellow).
Double arrow gap. Scissors – price gap (big gap).
The position of the gap icon is the final (time-wise) direction of the price movement above it.
Version changes:
1.01 Fixed the direction estimation algorithm and changed the TCandleInfo structure.
1.02 Fixed the display of 0-bar candle direction.
1.03 Fixed GetSomeStats function to calculate correctly on any shift bar
1.04 Added force cleaning of all drawing buffers. In MT5, information about the gap is drawn on each bar)))
1.05 Added the function of displaying gaps and automatically calculating dimensions
1.06 In the algorithm for estimating the direction of the largest candle applying the normalized size, the structure TCandleInfo was extended.
(This algorithm is consistent with the one used in the MS Candles Index indicator).
Statistical characteristics are evaluated over the entire history, over at least 1/3 of the size data window, allowing you to get up-to-the-minute results deep into history.
1.07 Fixed description. Small changes.
To use in MT4, change the file extension to .mq4 or download it here .
Attachment download
📎 ms-candle.mq5 (37.36 KB)
Source: MQL5 #23572
Lady - Сandle. Candle directional indicator, quote gap. -Key points before using MetaTrader 5 script
This page has been supplemented with structured instructions, focusing on the use of foreign exchange indicators, MT4/MT5 platform compatibility, testing procedures and risk control. Before downloading or deploying, it is recommended to first determine whether it is consistent with your own variety, cycle and account environment.
Suitable for who to use
- Users who want to quickly screen foreign exchange indicators and are willing to do simulation verification first.
- People who need to compare MT4/MT5 EAs, indicators, scripts or source code projects.
- Traders who wish to record backtests, parameters and risk boundaries before placing a trade.
Testing and risk control suggestions
- First verify the default parameters in the strategy tester or demo account, and then adjust the symbol, period, spread and trading period one by one.
- Scalping, grid, martin, and high-frequency strategies should focus on observing maximum drawdowns, consecutive losses, slippage, and trading frequency.
- It is not recommended to run any document directly on the real disk. At least observe the simulated disk performance for 2-4 weeks first.
FAQ
Can MT4 and MT5 be used interchangeably?
Usually cannot be used directly. EX4/MQ4 corresponds to MT4, EX5/MQ5 corresponds to MT5, and the source code needs to be compiled in the corresponding MetaEditor.
Is this resource guaranteed to be profitable?
cannot. EAs, indicators and scripts can only be used as trading tools, and the results depend on parameters, market environment, spreads, slippage and risk control.
What else can I continue to watch?
Forex EA download , foreign exchange indicator download , EA evaluation , MQL5 CodeBase .
English Search Notes
This page is also optimized for English search intent around Ms.-Сandle. Candle directional indicator, quote gap. -MetaTrader 5 script . Related search terms include: Forex indicator, MT4 indicator, MT5 indicator. Test any Forex EA, Expert Advisor, MT4/MT5 indicator, script or MQL source code with historical data and a demo account before live trading.
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •