Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Twitter !
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
Bibliothèque

IncPriceChannelOnArray - bibliothèque pour MetaTrader 5

Vues:
3162
Note:
(28)
Publié:
2012.01.19 13:44
Mise à jour:
2016.11.22 07:32
\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 CPriceChannelOnArray class is intended for calculation of the price channel on indicator buffers.

Usage:

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

  • int aPeriod 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 aDataHigh[] is the buffer with the High data for the indicator calculation;
  • double aDataLow[] is the buffer with the Low data for the indicator calculation;
  • double & aUpper[] is a calculated value of the upper line of the indicator;
  • double & aLower[] is a calculated value of the lower line of the indicator;
  • double & aMiddle[] is a calculated value of the central line 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_PriceChannelOnArray.mq5 file is an indicator demonstrating how to use the CPriceChannelOnArray class. The IncPriceChannelOnArray file must be located in the MQL5\Include\IncOnArray directory of the terminal data folder (the IncOnArray folder must be created).

The market is often accelerates and decelerates its movements, so it's not easy to draw the straight lines of support and resistance levels. The Price Channel Indicator draws the price channel, its upper and lower boundaries are determined by maximal and minimal prices for a certain period.

An example of using the CPriceChannelOnArray indicator

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

IncEnvelopesOnArray IncEnvelopesOnArray

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

IncVHFOnArray IncVHFOnArray

CVHFOnArray class is designed for calculation of Vertical Horizontal Filter (VHF) values on indicator buffers.

IncTrixOnArray IncTrixOnArray

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

IncFractalsOnArray IncFractalsOnArray

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