Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 4 Libraries | iACfunc, iAOfunc and iBearsBullsfuncs

MetaTrader Experts, Indicators, Scripts and Libraries

In this library you will find 3 custom functions: iACfunc, iAOfunc and iBearsBullsfuncs, which extend calculating capabilities of the appropriate functions and may be used for example in expert advisers.

In contrast to standard function iAC the proposed function iACfunc allows to calculate value with possibility to choose price, moving average and periods according to the following formulas:

AO = MA_mode (Applied_price, Period_1) - MA_mode (Applied_price, Period_2)
AC = AO - MA_mode (AO, Period_3)

double iACfunc (string Sy, int Tf, int MA_mode, int Applied_price, int Period_1, int Period_2, int Period_3, int Shift)

In contrast to standard function iAO the proposed function iAOfunc allows to calculate value with possibility to choose price, moving average and periods according to the following formula:

AO = MA_mode (Applied_price, Period_1) - MA_mode (Applied_price, Period_2)

double iAOfunc (string Sy, int Tf, int MA_mode, int Applied_price, int Period_1, int Period_2, int Shift)

In contrast to standard functions iBearsPower and iBullsPower the proposed function iBearsBullsfuncs allows to calculate values with possibility to choose also moving average according to the following formulas:

BEARS = LOW - Bears_MA _mode (Applied_price, BearsPeriod)
BULLS = HIGH - Bulls_MA _mode (Applied_price, BullsPeriod)

double iBearsPowerfunc (string Sy, int Tf, int BearsPeriod, int Applied_price, int Bears_MA_mode, int Shift)
double iBullsPowerfunc (string Sy, int Tf, int BullsPeriod, int Applied_price, int Bulls_MA_mode, int Shift)

Input parameters:

  • Sy - symbol,
  • Tf - timeframe,
  • MA_mode, Bears_MA_mode, Bulls_MA_mode - moving average,
  • Applied_price - applied price,
  • Period_1, Period_2, Period_3, BearsPeriod, BullsPeriod - period for calculation of appropriate moving average,
  • Shift - index of the value taken from the indicator buffer.

More detailed description of parameters with examples you will find in the attached zip file.

10834

Best MetaTrader Indicators + Profitable Expert Advisors