category Volatility  at 07/02/2023

QMASMAdelta indicator


QMASMAdelta is a volatility indicator based on the quadratic moving average and this indicator is compared it with standard deviation indicator, but is a bit more sensitive in price.

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

namespace cAlgo
    [Indicator(AccessRights = AccessRights.None)]
    public class mQMASMAdelta : Indicator
        [Parameter("Periods (14)", DefaultValue = 100)]
        public int inpPeriods { get; set; }

        [Output("QMA/SMA Delta", LineColor = "Black", PlotType = PlotType.Line, LineStyle = LineStyle.Solid, Thickness = 2)]
        public IndicatorDataSeries outQMASMAdelta { get; set; }
        private SimpleMovingAverage _sma, _pma;
        private IndicatorDataSeries _pow;

        protected override void Initialize()
            _pow = CreateDataSeries();
            _sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, inpPeriods);
            _pma = Indicators.SimpleMovingAverage(_pow, inpPeriods);

        public override void Calculate(int i)
            _pow[i] = Math.Pow(Bars.ClosePrices[i],2);
            outQMASMAdelta[i] = (Math.Sqrt(_pma.Result[i]) - _sma.Result[i]) / Symbol.TickSize;

mfejza's avatar

Joined 25.01.2022

  • Type: free
  • Language: C#
  • Trading Platform: cTrader Automate
  • Filename: mQMASMAdelta.algo
  • Rating: 0
  • Downloads: 275
Only logged in users can post a comment
spearira · 4 months ago

Re: snake game

That's right! It's a little more price sensitive.

weelmedia · 7 months ago

Thank you for your post. I have read through several similar topics! However, your article gave me a very special impression, unlike other articles. I hope you continue to have valuable articles like this or more to share with everyone! trap the cat