Description
Narrow Range indicator
The proposed indicator aims to measure the squeeze of market range price, by identifying the bar of lowest average true range value after a number of bars. After identifying the narrow range the new market pressure will happened in correction or new impulse price.
using System;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
namespace cAlgo
{
[Levels(0,1)]
[Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class mNarrowRange : Indicator
{
[Parameter("Period (4|7)", DefaultValue = 7)]
public int inpPeriod { get; set; }
[Output("NarrowRange", LineColor = "Black", PlotType = PlotType.Histogram, Thickness = 4)]
public IndicatorDataSeries outNR { get; set; }
private IndicatorDataSeries _range, _minrange;
protected override void Initialize()
{
_range = CreateDataSeries();
_minrange = CreateDataSeries();
}
public override void Calculate(int i)
{
_range[i] = Bars.HighPrices[i] - Bars.LowPrices[i];
_minrange[i] = _range.Minimum(inpPeriod);
outNR[i] = _range[i] < _minrange[i-1] ? +1 : 0;
}
}
}
mfejza
Joined on 25.01.2022
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: mNarrowRange.algo
- Rating: 5
- Installs: 74
- Modified: 19/08/2024 08:26
Note that publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section, please use the Copyright Infringement Notification form to submit a claim.
Comments
Log in to add a comment.
SA
When I read an article on this topic, 카지노게임사이트 the first thought was profound and difficult, and I wondered if others could understand.. My site has a discussion board for articles and photos similar to this topic. Could you please visit me when you have time to discuss this topic?
Your writing is excellent, so allow me to share a little of myself. One of the best available limitless running games is retro games. Control your ball as you compete in a fast ramp race to see how far you can climb the leaderboard.