Category Oscilators  Published on 18/02/2023

WKB Internal Bar Strength indicator

Description

This indicator is quite suitable even for the beginner at Forex, also it will be a good addition to a trading system of a professional. WKBIBS (WKB Internal Bar Strength) gives the earliest signals in comparison to standard Stochastic type oscillators. In contrast to all arrow indicators, it neither gives false signals, nor it redraws. WKBIBS is not more complex visually than arrow indicators but it gives more early and correct signals.

Usage, when the blue oscillator crosses the upper green line downwards, it is time to sell, and if the blue oscillator crosses the lower red line upwards, it is time to buy. It's very simple, and most importantly, very clear: at the moment when a signal appears, a price on a chart is still actual for entering the market in the appropriate direction. The rest features including the possible use of a trend filter and preferred trades direction you can choose for yourself.

The Internal Bar Strength indicator you can find here


using System;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo
{
    [Levels(40,50,60)]
    [Indicator(AccessRights = AccessRights.None)]
    public class mWKBInternalBarStrength : Indicator
    {
        [Parameter("Periods (5)", DefaultValue = 5)]
        public int inpPeriods { get; set; }
        [Parameter("SmoothType (sma)", DefaultValue = MovingAverageType.Simple)]
        public MovingAverageType inpSmoothType { get; set; }
        [Parameter("Range Periods (25)", DefaultValue = 25)]
        public int inpRangePeriods { get; set; }
        [Parameter("Smooth Range Periods (3)", DefaultValue = 3)]
        public int inpSmoothRangePeriods { get; set; }

        [Output("Internal Bar Strength", LineColor = "Black", PlotType = PlotType.Line, LineStyle = LineStyle.Solid, Thickness = 1)]
        public IndicatorDataSeries outIBS { get; set; }
        [Output("Internal Bar Strength Range Max", LineColor = "Red", PlotType = PlotType.Line, LineStyle = LineStyle.Solid, Thickness = 1)]
        public IndicatorDataSeries outIBSmax { get; set; }
        [Output("Internal Bar Strength Range Min", LineColor = "Red", PlotType = PlotType.Line, LineStyle = LineStyle.Solid, Thickness = 1)]
        public IndicatorDataSeries outIBSmin { get; set; }
        
        private IndicatorDataSeries _deltahl, _rawibs, _rangemin, _rangemax;
        private MovingAverage _smoothibs, _smoothrangemax, _smoothrangemin;
        

        protected override void Initialize()
        {
            _deltahl = CreateDataSeries();
            _rawibs = CreateDataSeries();
            _smoothibs = Indicators.MovingAverage(_rawibs, inpPeriods, inpSmoothType);
            _rangemin = CreateDataSeries();
            _rangemax = CreateDataSeries();
            _smoothrangemin = Indicators.MovingAverage(_rangemin, inpSmoothRangePeriods, MovingAverageType.Simple);
            _smoothrangemax = Indicators.MovingAverage(_rangemax, inpSmoothRangePeriods, MovingAverageType.Simple);
        }

        public override void Calculate(int i)
        {
            _deltahl[i] = Bars.HighPrices[i] - Bars.LowPrices[i];
            _rawibs[i] = _deltahl[i] > 0 ? (Bars.ClosePrices[i] - Bars.LowPrices[i]) / _deltahl[i] : 0;
            _rangemin[i] = i>inpPeriods ? _smoothibs.Result.Minimum(inpRangePeriods) : _smoothibs.Result[i];
            _rangemax[i] = i>inpPeriods ? _smoothibs.Result.Maximum(inpRangePeriods) : _smoothibs.Result[i];
            
            outIBS[i] = 100.0 * _smoothibs.Result[i];
            outIBSmin[i] = 100.0 * _smoothrangemin.Result[i];
            outIBSmax[i] = 100.0 * _smoothrangemax.Result[i];
        }
    }
}

mfejza's avatar
mfejza

Joined on 25.01.2022

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: mWKBInternalBarStrength.algo
  • Rating: 5
  • Installs: 571
  • Modified: 18/02/2023 12:33
Comments
Log in to add a comment.
No comments found.