HighMinusLow


Summary

Difference between MarketSeries.High and MarketSeries.Low calculation for each index

Remarks

This volatility indicator works by calculating the difference between the high and the low of each trendbar. The larger the difference between high and low, the more volatile the market during that period.

Syntax

public interface HighMinusLow

Members

NameTypeSummary
Result PropertyThe resulting time series of the calculation

Example 1

using cAlgo.API;
using cAlgo.API.Indicators;
namespace cAlgo.Indicators
{
    [Indicator]
    public class Example : Indicator
    {
        private HighMinusLow _highMinusLow;
        protected override void Initialize()
        {
            _highMinusLow = Indicators.HighMinusLow();
        }
        public override void Calculate(int index)
        {
            // same as MarketSeries.High[index] - MarketSeries.Low[index];
            Print("High minus Low result = {0}", _highMinusLow.Result[index]);
        }
    }
}