Guarda come scaricare robot di trading gratuitamente
Ci trovi su Telegram!
Unisciti alla nostra fan page
Script interessante?
Pubblica il link!
lasciare che altri lo valutino
Ti è piaciuto lo script? Provalo nel Terminale MetaTrader 5
Visualizzazioni:
3341
Valutazioni:
(29)
Pubblicato:
2012.01.19 12:21
Aggiornato:
2016.11.22 07:32
\MQL5\Include\IncOnArray\ \MQL5\Indicators\
Freelance MQL5 Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance

The CVidyaOnArray class is intended for calculation of VIDYA (Variable Index Dynamic Average) on an indicator buffer.

Usage:

The Init() method with the following parameters is called in the OnInit() function of the indicator:

  • int aCMOPeriod is period of the CMO oscillator;
  • int aMAPeriod is indicator period.

The Solve() method with the following parameters is called in the OnCalculate() function:

  • const int aRatesTotal is the rates_total variable from the OnCalculate() function parameters;
  • const int aPrevCalc is the prev_calculated variable from the OnCalculate() function parameters;
  • double & aData[] is the buffer with data for the indicator calculation;
  • double & aVIDYA[] is a calculated value of the indicator.

Additional methods:

  • int BarsRequired() returns the minimum number of bars required for the indicator calculation;
  • string Name() returns a string with the indicator name;

The Test_VidyaOnArray.mq5 is an indicator demonstrating how to use the CVidyaOnArray class. The IncVidyaOnArray file must be located in the MQL5\Include\IncOnArray directory of the terminal data folder (the IncOnArray folder must be created).

Variable Index Dynamic Average Technical Indicator (VIDYA) was developed by Tushar Chande. It is an original method of calculating the Exponential Moving Average (EMA) with the dynamically changing period of averaging. Period of averaging depends on the market volatility; as the measure of volatility Chande Momentum Oscillator (CMO) was chosen. This oscillator measures the ratio between the sum of positive increments and sum of negative increments for a certain period (CMO period). CMO value is used as the ratio to the smoothing factor EMA. Thus VIDYA has to setup parameters: period of CMO and period of EMA.

An example of using the CVidyaOnArray class

Tradotto dal russo da MetaQuotes Ltd.
Codice originale https://www.mql5.com/ru/code/636

IncForceOnArray IncForceOnArray

The CForceOnArray class is intended for calculation of Force Index on indicator buffers.

IncWPROnArray IncWPROnArray

The CWPROnArray class is intended for calculation of Williams' Percent Range (%R) on indicator buffers. The example of use of the class is provided.

3D_Oscillator_HTF_Signal 3D_Oscillator_HTF_Signal

3D_Oscillator_Signal shows a trend direction or a signal for performing a deal generated by 3D_Oscillator as text messages with a trend color indication or deal direction and gives alerts or audio signals.

ZigZag based on the fractals of a larger timeframe ZigZag based on the fractals of a larger timeframe

ZigZag based on the fractals of a larger timeframe considering VininI_FractalsTrend indicator data.