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:
2952
Valutazioni:
(24)
Pubblicato:
2011.12.26 10:43
Aggiornato:
2017.09.06 10:17
\MQL5\Include\IncOnArray\ \MQL5\Indicators\
Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance

COsMAOnArray class is designed for calculation of OsMA (Moving Average of Oscillator) values on indicator buffers.

Usage:

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

  • int aFastPeriod - fast МА period;
  • int aSlowPeriod - slow МА period;
  • int aSignalPeriod - signal line period.
  • ENUM_MA_METHOD aFastMethod - fast МА method;
  • ENUM_MA_METHOD aSlowMetod - slow МА period;
  • ENUM_MA_METHOD aSignalMethod - signal line method.

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

  • const int aRatesTotal is a rates_total variable from the OnCalculate() function parameters;
  • const int aPrevCalc - prev_calculated variable from the OnCalculate() function;
  • double aData[] - the buffer with the data for the indicator calculation;
  • double aFastMA[] - intermediate buffer for fast МА;
  • double aSlowMA[] - intermediate buffer for slow МА;
  • double aMain[] - intermediate buffer for MACD main line;
  • double aSignal[] - intermediate buffer for MACD signal line;
  • double aOsMA[] - OsMA calculated value.
Additional methods:
  • int BarsRequiredSignal() - returns the minimum number of bars for signal line calculation;
  • string Name() - returns the line with the indicator name;
  • string Names() - returns the line with the МА names.

Test_OsMAOnArray.mq5 is a sample indicator showing COsMAOnArray class application. IncOsMAOnArray file must be placed to MQL5\Include\IncOnArray of the terminal data folder (IncOnArray folder must be created).

CMAOnArray class from the IncMAOnArray file is needed for the proper work. It can be found here.

Example of use of COsMAOnArray class

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

X2MA Transform Candles X2MA Transform Candles

The indicator transfers the price data to the new coordinates system associated with X2MA indicator values.

Elder Impulse System Elder Impulse System

The candlesticks are colored in red, green and blue colors depending on a trend direction (Moving Average and MACD overall values).

VGridLine Intraday X6 VGridLine Intraday X6

Vertical time grid with six hours step.

XTrendlessOS (trendless oscillator) XTrendlessOS (trendless oscillator)

The indicator is based on the description given in Joe DiNapoli book "Trading with DiNapoli Levels". It is designed to evaluate the actual market overbought/oversold states.