Synthetic VIX Indicator For MT5
Table Of Contents:
- Synthetic VIX Indicator For MT5
- Installation des Synthetic VIX Indicator For MT5
- Parameter des Synthetic VIX Indicator For MT5
- Puffer des Synthetic VIX Indicator For MT5
- Hauptteile des Codes
Der Synthetic VIX Indicator For MT5 basiert auf dem bekannten Standard-VIX-Indikator. Der Standard-VIX-Indikator ist auf Aktienindizes wie S & P 500, NASDAQ usw. beschränkt. Der synthetische VIX unterliegt keinen Einschränkungen. Es kann auf jedem Handelsinstrument eingesetzt werden.
Installation des Synthetic VIX Indicator For MT5
Nachdem Sie den Indikator über das obige Formular heruntergeladen haben, müssen Sie die Zip-Datei entpacken. Anschließend müssen Sie die Datei Synthetic VIX.mq5 in den Ordner MQL5Indicators Ihrer MT5 Installation kopieren. Starten Sie danach MT5 neu und Sie können den Indikator in der Liste der Indikatoren sehen.
Parameter des Synthetic VIX Indicator For MT5
Der Synthetic VIX Indicator For MT5 verfügt über 1 zu konfigurierende Parameter.
input int inpVixPeriod = 20; // Synthetic VIX period
Puffer des Synthetic VIX Indicator For MT5
Der Synthetic VIX Indicator For MT5 stellt 2 Puffer bereit.
SetIndexBuffer(0,val,INDICATOR_DATA); SetIndexBuffer(1,valc,INDICATOR_COLOR_INDEX);
Hauptteile des Codes
int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { if(Bars(_Symbol,_Period) lt rates_total) return(prev_calculated); int i=(int)MathMax(prev_calculated-1,0); for(; i lt rates_total && !_StopFlag; i++) { int _start = MathMax(i-inpVixPeriod+1,0); double _highest = high[ArrayMaximum(high,_start,inpVixPeriod)]; val[i] = 100.0*(_highest-low[i])/_highest;; valc[i] = (i gt 0) ?(val[i] gt val[i-1]) ? 1 :(val[i] lt val[i-1]) ? 2 : valc[i-1]: 0; } return (i); }