Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2012.09.23 22:56
Libraries

iACfunc, iAOfunc and iBearsBullsfuncs - library for MetaTrader 4

| English 日本語 Русский Español Deutsch Português

Views:
3261
Rating:
votes: 9

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.

Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/10834

Modify stop loss or take profit Modify stop loss or take profit

Scripts to modify stop loss in buy or sell opened orders on current chart.

clock displaying time in main chart clock displaying time in main chart

For those trader who can't stand having the Market Watch or Navigator boxes up on their platform but like to have a time displayed on chart a Simple Clock Indicator

Schaff Trend + Signal EMA  Schaff Trend + Signal EMA

Schaff Trend + Signal EMA

Elliot Waves labels Elliot Waves labels

A simple script to quickly place letter/numbers on the chart for wave labeling (A, B, C or 1, 2, 3, etc)