MQL4 iOsMA Indicator

Overview

Calculates the Moving Average of Oscillator indicator and returns its value.

Function Signature

double iOsMA(
  string          symbol,         // symbol
  int             timeframe,      // timeframe
  int             fast_ema_period,  // Fast EMA period
  int             slow_ema_period,  // Slow EMA period
  int             signal_period,    // Signal line period
  int             applied_price,    // applied price
  int             shift           // shift
);

Parameters

  • **symbol**: Symbol name. NULL means the current symbol.
  • **timeframe**: Timeframe. Any ENUM_TIMEFRAMES value. 0 means the current chart timeframe.
  • **fast_ema_period**: Fast EMA averaging period.
  • **slow_ema_period**: Slow EMA averaging period.
  • **signal_period**: Signal line averaging period.
  • **applied_price**: Applied price. Any ENUM_APPLIED_PRICE value.
  • **shift**: Index of the value taken from the indicator buffer (shift relative to the current bar).
  • Returned Value

    Numerical value of the Moving Average of Oscillator.

    Example

    if(iOsMA(NULL,0,12,26,9,PRICE_OPEN,1)>iOsMA(NULL,0,12,26,9,PRICE_OPEN,0)) return(0);
    

    Related Indicators

  • [iMAOnArray](/indicators/imaonarray)
  • [iMACD](/indicators/imacd)
  • Platform Support

  • MQL4 language
  • Data Types

  • double (return value)
  • string (symbol)
  • int (timeframe, periods, shift)
  • ENUM_TIMEFRAMES (timeframe constants)
  • ENUM_APPLIED_PRICE (applied price constants)