Category Volatility  Published on 20/12/2021

Volatility Quality Index (VQI)

Description

The volatility quality index (VQI) by Thomas Stridsman was firstly published in 2002 on Technical Analysis of Stocks and Commodities magazine.

The idea behind the volatility quality index is to point out the difference between bad and good volatility in order to identify better trade opportunities in the market.

This forex indicator works using the True Range algorithm in combination with the open, close, high and low prices.

Stridsman suggested to buy when VQI has increased in the previous 10 bars (use the SMA) and sell when it has decreased in the previous 10 bars. Use this with your other indicators as a confirmation signal.

 

Github: GitHub - Doustzadeh/cTrader-Indicator

 


using System;
using cAlgo.API;
using cAlgo.API.Indicators;

namespace cAlgo
{
    [Indicator(IsOverlay = false, AccessRights = AccessRights.None)]
    public class VolatilityQualityIndex : Indicator
    {
        [Parameter("Fast Periods", DefaultValue = 9)]
        public int FastPeriods { get; set; }

        [Parameter("Slow Periods", DefaultValue = 200)]
        public int SlowPeriods { get; set; }

        [Parameter("MA Type", DefaultValue = MovingAverageType.Simple)]
        public MovingAverageType MaType { get; set; }

        [Output("VQI", LineColor = "Lime", Thickness = 2)]
        public IndicatorDataSeries VQI { get; set; }

        [Output("Fast MA", LineColor = "DodgerBlue")]
        public IndicatorDataSeries FastMA { get; set; }

        [Output("Slow MA", LineColor = "Red")]
        public IndicatorDataSeries SlowMA { get; set; }

        private double vqi_t;
        private IndicatorDataSeries vqi;
        private TrueRange TR;
        private MovingAverage MA_Fast, MA_Slow;


        protected override void Initialize()
        {
            vqi = CreateDataSeries();
            TR = Indicators.TrueRange();
            MA_Fast = Indicators.MovingAverage(VQI, FastPeriods, MaType);
            MA_Slow = Indicators.MovingAverage(VQI, SlowPeriods, MaType);
        }

        public override void Calculate(int index)
        {
            if (index < 1)
            {
                vqi[index] = 0;
                VQI[index] = 0;
                return;
            }

            double PrvClose = Bars.ClosePrices[index - 1];

            double Open = Bars.OpenPrices[index];
            double High = Bars.HighPrices[index];
            double Low = Bars.LowPrices[index];
            double Close = Bars.ClosePrices[index];

            double TrueRange = TR.Result[index];
            double Range = High - Low;

            vqi_t = TrueRange != 0 && Range != 0 ? (((Close - PrvClose) / TrueRange) + ((Close - Open) / Range)) * 0.5 : vqi[index - 1];
            vqi[index] = Math.Abs(vqi_t) * ((Close - PrvClose + Close - Open) * 0.5);

            VQI[index] = VQI[index - 1] + vqi[index];
            FastMA[index] = MA_Fast.Result[index];
            SlowMA[index] = MA_Slow.Result[index];
        }
    }
}


Doustzadeh's avatar
Doustzadeh

Joined on 20.03.2016

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Volatility Quality Index.algo
  • Rating: 0
  • Installs: 1643
Comments
Log in to add a comment.
KH
khabeer437 · 1 year ago

السلامة ضرورية. يجب عليك حماية نفسك ومنزلك ومكتبك من أي تهديدات أو أذى. للبقاء آمنًا في مكان عملك ، فأنت بحاجة إلى أفضل أقفال للأبواب مع أفضل ميزات الأمان وأفضل جودة.

عندما تضع في اعتبارك السلامة ، يجب أن تستعد لأحداث غير متوقعة وغير مسبوقة. أنت لا تعرف ما الذي سيحدث بعد ذلك ، لذا فإن الاستعداد للأسوأ هو أقل ما يمكنك فعله للحفاظ على نفسك وعائلتك وممتلكاتك في أمان. لذلك أنت بحاجة إلى قفل باب رئيسي عالي الجودة.

فتح اقفال ابواب الكويت

تستخدم أدوات الصنفرة لغرض تنعيم الخشب بعد الانتهاء من صنعه، وإزالة الآثار الباقية على الخشب الناتجة من ستخدام أدوات النجارة الأخرى، حيث يتم الحصول على خشب ناعم وجاهز للعمليات النهائية لتخرجه جاهزاً للاستخدام، هناك عدّة أدوات للصنفرة فمنها كهربائية، وأخرى يدوية، مثل ورق الصنفرة المصنوع من حجر الصوان أو أكسيد الأمنيوم. تستخدم أدوات الصنفرة والتشطيب النهائي كالدهان وغيره بغرض الحصول على خشب ناعم وجميل، بحيث تظهر تفاصيل الخشب ورسوماته أو نقشاته بشكل واضح وبلون جميل وبرّاق، كما تحمي هذه التشطيبات النهاية الخشب من المؤثرات الخارجيّة التي يتعرّض لها الخشب مع الزمن.
نجار خشب الكويت