Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Facebook !
Rejoignez notre page de fans
Un script intéressant ?
Poster un lien vers celui-ci -
laisser les autres l'évaluer
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
Vues:
2790
Note:
(17)
Publié:
2012.01.19 14:26
Mise à jour:
2017.09.06 10:16
\MQL5\Include\IncOnArray\ \MQL5\Indicators\
Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

The CTrixOnArray class is intended for calculation of Triple Exponential Average (TRIX) on an indicator buffer.

Usage:

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

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 a buffer with data for the indicator calculation;
  • double aM1[] is an intermediate buffer for calculations;
  • double aM2[] is an intermediate buffer for calculations;
  • double aM3[] is an intermediate buffer for calculations;
  • double aTrix[] is the buffer with calculated values 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;

Test_TrixOnArray.mq5 is an indicator demonstrating how to use the CTrixOnArray class. The IncTrixOnArray file must be located in the MQL5\Include\IncOnArray directory of the terminal data folder (the IncOnArray folder must be created). The CMAOnArray class for the IncMAOnArray file is required for this class for work.

Triple Exponential Average (TRIX) was developed by Jack Hutson as an oscillator of the overbought/oversold market conditions. It can also be used as the Momentum indicator. Triple smoothing is used for removing the cyclic components in price movements with the period less than that of TRIX.

An example of using the CTrixOnArray class

Traduit du russe par MetaQuotes Ltd.
Code original : https://www.mql5.com/ru/code/655

IncPriceChannelOnArray IncPriceChannelOnArray

The CPriceChannelOnArray class is intended for calculation of the price channel on indicator buffers.

IncEnvelopesOnArray IncEnvelopesOnArray

The CEnvelopesOnArray class is intended for calculation of Envelopes on an indicator buffer.

IncFractalsOnArray IncFractalsOnArray

The CFractalsOnArray class is intended for calculation of Fractals on indicator buffers.

IncCHVOnArray IncCHVOnArray

The CCHOOnArray class is intended for calculation of the Chaikin Volatility indicator (CHV) on indicator buffers.