Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Stochastic Momentum Color Candles - MetaTrader 5 Script | Forex Indicators Download - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

Stochastic Momentum Color Candles - indicator for MetaTrader 5

Stochastic Momentum Color Candles - indicator for MetaTrader 5

Stochastic Momentum Color Candles - indicator for MetaTrader 5

Based on William Blau's Stochastic Momentum Indicator https://www.mql5.com/en/code/370 proposed by Andrey F. Zelinsky, I came up with the idea of ​​not only showing the closing price but also knowing more about the bar development. The idea of ​​bars is not new either, its principles can be found here: https://www.mql5.com/en/code/13010

Not much has changed except that stochastic momentum has been calculated for all four buffers (OHLC).

Stochastic Momentum Color Candles - indicator for MetaTrader 5


There are two formulas for random momentum with period q:

StochMom(price,q) = price- 1/2 * [LL(q) + HH(q)]

(The result is the absolute value of the price change compared to the mean)

StochMom(price,q) = (100 * price) / (1/2 * [LL(q) + HH(q)])

(The result is the percentage change in price when the average is 100%)

These are implemented and can be toggled using InpFormula.

Stochastic momentum indicates how far the last bar's closing price deviates from the average between the high and low prices of the last q bars. However, this calculation can be performed in exactly the same way for the open, high, and low prices.

Stochastic momentum is used in a similar way to normal momentum. Trends are indicated by values ​​that remain above or below the center line for an extended period of time. Crossing the center line can indicate a change in direction. Especially after a longer trend, crossing the center line and then crossing the center line again can indicate a continuation of the trend. You can also query the color buffer to find out which direction the bar is moving.

Sometimes the current bar moves too much, causing the center line to shift and the bar chart display to shift (the long bar in the image above). Whether this artifact is useful remains to be tested.

Record quotes in real quote mode and read them in math mode and call your strategy on each quote.

Professional closing panel with 6 smart filters. Close all positions by type, by symbol or by P&L. Real-time profit and loss display. Ideal for emergency exits and risk management. Includes security confirmation.

Set up three crossovers and monitor daily percentage performance starting from a given time (which can also be set).

CDateTime millisecond extension + date and time monitoring variable extension


Attachment download

📎 stochmomcolorcandles.mq5 (7.55 KB)

Source: MQL5 #48208

Verification code Refresh