Category Oscilators  Published on 16/12/2023

High-Low Momentum indicator (William Blau)

Description

The Blau High-Low Momentum (BHLM) indicator is a technical analysis tool designed to measure momentum in the financial markets. It was developed by Dr. William Blau. The BHLM indicator is based on the concept of momentum and is calculated using the high and low prices of a financial instrument.

Momentum Measurement:

  • The BHLM indicator measures the relative momentum based on the difference between the high and low prices. It aims to capture the momentum of price movements within a given period.

Range-Bound Market:

  • In a range-bound or sideways market, the BHLM value tends to oscillate around zero. Traders may interpret this as a lack of strong momentum in the market.

Trend Confirmation:

  • During a trending market, the BHLM may deviate from zero, indicating the strength and direction of the trend. A rising BHLM value may suggest bullish momentum, while a falling value may indicate bearish momentum.

How to Use:

Crossovers:

  • Traders may look for crossovers of the BHLM line with zero. A crossover above zero may be interpreted as a bullish signal, suggesting potential upward momentum. Conversely, a crossover below zero may indicate potential downward momentum.

Divergence:

  • Divergence between the BHLM and price movement could be used as a potential reversal signal. For example, if prices are making new highs but the BHLM is not confirming the highs, it may suggest weakening momentum.

Trend Confirmation:

  • Traders may use the BHLM as a confirmation tool for trends identified by other indicators. When the BHLM aligns with the direction of the trend, it may provide additional confirmation.

It's essential to note that like any technical indicator, the BHLM is not foolproof, and false signals may occur. Traders often use it in conjunction with other indicators and analysis methods to make more informed trading decisions. Additionally, parameter settings and the period over which the high and low prices are calculated can be adjusted based on the trader's preferences and the characteristics of the market being analyzed.


// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// © mfejza
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;


namespace cAlgo
{
    [Levels(0)]
    [Cloud("HighLow Momentum", "LevelZero", FirstColor = "Green", SecondColor = "Red" , Opacity = 0.05)]
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class mBlauHighLowMomentum : Indicator
    {
        [Parameter("Momentum Period (2)", DefaultValue = 2, MinValue = 2)]
        public int inpMomentumPeriod { get; set; }
        [Parameter("First Smooth (20)", DefaultValue = 20, MinValue = 2)]
        public int inp1stSmoothPeriod { get; set; }
        [Parameter("Second Smooth (5)", DefaultValue = 5, MinValue = 2)]
        public int inp2ndSmoothPeriod { get; set; }
        [Parameter("Third Smooth (3)", DefaultValue = 3, MinValue = 2)]
        public int inp3rdSmoothPeriod { get; set; }

        [Output("HighLow Momentum", LineColor = "Black", PlotType = PlotType.Line, LineStyle = LineStyle.Solid, Thickness = 1)]
        public IndicatorDataSeries outHLM { get; set; }
        [Output("LevelZero", LineColor = "Transparent", PlotType = PlotType.Line, LineStyle = LineStyle.Solid, Thickness = 1)]
        public IndicatorDataSeries outLevelZero { get; set; }
        
        private IndicatorDataSeries _highmom, _lowmom, _deltamom;
        private MovingAverage _smooth1, _smooth2, _smooth3;


        protected override void Initialize()
        {
            _highmom = CreateDataSeries();
            _lowmom = CreateDataSeries();
            _deltamom = CreateDataSeries();
            _smooth1 = Indicators.MovingAverage(_deltamom, inp1stSmoothPeriod, MovingAverageType.Exponential);
            _smooth2 = Indicators.MovingAverage(_smooth1.Result, inp2ndSmoothPeriod, MovingAverageType.Exponential);
            _smooth3 = Indicators.MovingAverage(_smooth2.Result, inp3rdSmoothPeriod, MovingAverageType.Exponential);
        }

        public override void Calculate(int i)
        {
            _highmom[i] = Bars.HighPrices[i] - (i>inpMomentumPeriod ? Bars.HighPrices[i-(inpMomentumPeriod-1)] : Bars.ClosePrices[i]);
            _lowmom[i] = -1 * (Bars.LowPrices[i] - (i>inpMomentumPeriod ? Bars.LowPrices[i-(inpMomentumPeriod-1)] : Bars.ClosePrices[i]));
            _deltamom[i] = (_highmom[i]>0 ? _highmom[i] : 0) - (_lowmom[i]>0 ? _lowmom[i] : 0);
            
            outHLM[i] = _smooth3.Result[i] / Symbol.PipSize;
            outLevelZero[i] = 0;
        }
    }
}


mfejza's avatar
mfejza

Joined on 25.01.2022

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: mBlauHighLowMomentum.algo
  • Rating: 5
  • Installs: 668
  • Modified: 16/12/2023 11:22
Comments
Log in to add a comment.
No comments found.