Candlestick Momentum Indicator (CMTM) by William Blau
Info
The Candlestick Momentum Indicator (CMTM) by William Blau is a Indicator for MetaTrader 5 that candlestick momentum indicator (q-period candlestick momentum) by william blau. To use this indicator, place the williamblau.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Indicator works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Indicators folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Candlestick Momentum Indicator (CMTM) by William Blau
1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.
2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.
3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.
4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.
Frequently Asked Questions
Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."
Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).
Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.
What this tool does
Candlestick Momentum Indicator (Q-Period Candlestick Momentum) by William Blau.
Typical Use Case
This Indicator excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Indicator works on MetaTrader 5. Place the file in the MQL5/Indicators folder and restart the terminal.
Description & Settings
Related: candle painting based on momentum and news impact - another powerful indicator for MetaTrader 5 traders.
Candlestick Momentum Indicator (Q-Period Candlestick Momentum) by William Blau.Also recommended: momentum indicator: a powerful tool for trend analysis and leading signals - similar indicator with strong performance on MetaTrader 5.
To use this indicator, place the williamblau.mqh file in your terminal_data_folder/mql5/include/ directory, and the blau_cmtm.mq5 file in your terminal_data_folder/mql5/indicators/ directory.
Momentum is calculated as the difference between the current price (e.g., closing price of the bar) and the price from a specified number of bars ago. This indicator can be applied to any timeframe and period.
According to William Blau, the candlestick momentum is defined as the change in price over a fixed interval. The formula is:
Momentum = Current Price - Price (Q bars ago)
Where:
Current Price can be the close price of the bar.
Price (Q bars ago) can be the open price of the bar Q bars ago.
Candlestick momentum can be positive or negative. A positive momentum occurs when the closing price is greater than the opening price, indicating upward movement. A negative momentum occurs when the opening price is greater than the closing price, indicating downward movement.
The definition of candlestick momentum can be extended:
Candlestick momentum is applicable to any timeframe.
The applied price (e.g., closing price, open price) can be varied.
The definition of the Q-period candlestick momentum:
Calculation:
The formula for calculating candlestick momentum is:
CMTM = Price1 - Price2[Q-1]
Where:
Q is the number of bars used in the calculation.
Price1 is the current price (e.g., closing price).
Price2[Q-1] is the price from Q bars ago (e.g., open price).
The smoothed Q-period candlestick momentum is calculated using Exponential Moving Averages (EMA):
Smoothed CMTM = EMA(EMA(EMA(CMTM, R), S), U)
Where:
CMTM(Price1, Price2, Q) = Price1 - Price2[Q-1] - the Q-period candlestick momentum.
EMA(CMTM(Price1, Price2, Q), R) is the first smoothing using an EMA with period R.
EMA(EMA(..., R), S) is the second smoothing using an EMA with period S applied to the result of the first smoothing.
EMA(EMA(EMA(..., R), S), U) is the third smoothing using an EMA with period U applied to the result of the second smoothing.
Input Parameters:
Q: Period of the candlestick momentum indicator (default Q=1).
R: Period of the 1st EMA smoothing (default R=20).
S: Period of the 2nd EMA smoothing (default S=5).
U: Period of the 3rd EMA smoothing (default U=3).
AppliedPrice1: The price to use for Price1 (default appliedprice=price_close).
AppliedPrice2: The price to use for Price2 (default appliedprice=price_open).
Notes:
Q > 0.
R > 0, S > 0, U > 0. If R, S, or U are equal to 1, smoothing is not applied.
Minimum rates required = (Q-1 + R + S + U - 3 + 1).
You may also like: heiken-ashi indicator: a synthetic candlestick approach - excellent alternative for indicator users on MetaTrader 5.
Source Code
#property copyright "robotfx"
#property link "https://robotfx.org"
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
#include <williamblau.mqh> // include file (terminal_data_folder\mql5\include)
#property indicator_separate_window // indicator in a separate window
#property indicator_buffers 6 // number of buffers
#property indicator_plots 1 // number of plots
#property indicator_label1 "cmtm" // label of graphic plot #0
#property indicator_type1 draw_line // draw as a line
#property indicator_color1 blue // line color
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.