Home Products Molanis Strategy Builder for MT4 MT4 Indicators Quick Reference
 
MetaTrader 4 Quick Reference Guide E-mail

Use this quick reference if you want to know more about the options related to MT4 standard indicators.


Chart Periods
Moving Average Calculation Methods
Applied Price Constants
Indicator Line Identifiers
Indicators

 

Chart Periods

 

Timeframe of the chart (chart period). It can be any of the following values:

Constant

Value

Description

PERIOD_M1

1

1 minute.

PERIOD_M5

5

5 minutes.

PERIOD_M15

15

15 minutes.

PERIOD_M30

30

30 minutes.

PERIOD_H1

60

1 hour.

PERIOD_H4

240

4 hour.

PERIOD_D1

1440

Daily.

PERIOD_W1

10080

Weekly.

PERIOD_MN1

43200

Monthly.

0 (zero)

0

Timeframe used on the chart

 

Moving Average Calculation Methods

 

Moving Average calculation method used iAlligator(), iEnvelopes(), iEnvelopesOnArray, iForce(), iGator(), iMA(), iMAOnArray(), iStdDev(), iStdDevOnArray(), iStochastic() indicators.
It can be any of the following values:

Constant

Value

Description

MODE_SMA

0

Simple moving average,

MODE_EMA

1

Exponential moving average,

MODE_SMMA

2

Smoothed moving average,

MODE_LWMA

3

Linear weighted moving average.

 

Applied Price Constants

 

Applied price constants. It can be any of the following values:

Constant

Value

Description

PRICE_CLOSE

0

Close price.

PRICE_OPEN

1

Open price.

PRICE_HIGH

2

High price.

PRICE_LOW

3

Low price.

PRICE_MEDIAN

4

Median price, (high+low)/2.

PRICE_TYPICAL

5

Typical price, (high+low+close)/3.

PRICE_WEIGHTED

6

Weighted close price, (high+low+close+close)/4.

 

 

Indicator Line Identifiers

 

Indicator line identifiers used iMACD(), iRVI() and iStochastic() indicators.
It can be one of the following values:

Constant

Value

Description

MODE_MAIN

0

Base indicator line.

MODE_SIGNAL

1

Signal line.


Indicator line identifiers used in iADX() indicator.

Constant

Value

Description

MODE_MAIN

0

Base indicator line.

MODE_PLUSDI

1

+DI indicator line.

MODE_MINUSDI

2

-DI indicator line.


Indicator line identifiers used in iBands(), iEnvelopes(), iEnvelopesOnArray(), iFractals() and iGator() indicators.

Constant

Value

Description

MODE_UPPER

1

Upper line.

MODE_LOWER

2

Lower line.

 

Ichimoku Kinko Hyo identifiers used in  iIchimoku() indicator call as source of requested data.
It can be one of the following values:

Constant

Value

Description

MODE_TENKANSEN

1

Tenkan-sen.

MODE_KIJUNSEN

2

Kijun-sen.

MODE_SENKOUSPANA

3

Senkou Span A.

MODE_SENKOUSPANB

4

Senkou Span B.

MODE_CHINKOUSPAN

5

Chinkou Span.

 


Indicators

 

Accelerator/Decelerator Oscillator – iAC
Accumulation/Distribution – iAD
Alligator – iAlligator
Average Movement Directional Index – iADX
Average True Range – iATR
Awesome Oscillator – iAO
Bears Power – iBearsPower
Bollinger Bands – iBands
Bulls Power – iBullsPower
Commodity Channel Index – iCCI
Custom Indicator – iCustom
DeMarker – iDeMarker
Envelopes – iEnvelopes
Force Index – iForce
Fractals – iFractals
Gator Oscillator – iGator
Ichimoku Kinko Hyo – iIchimoku
Market Facilitation Index – iBWMFI
Momentum – iMomentum
Money Flow Index – iMFI
Moving Average – iMA
Moving Average of Oscillator – iOsMA
Moving Averages Convergence/Divergence – iMACD
On Balance Volume – iOBV
Parabolic SAR Stop and Reverse System – iSAR
Percent Range – iWPR
Relative Strength Index – iRSI
Relative Vigor Index – iRVI
Standard Deviation – iStdDev
Stochastic Oscillator – iStochastic

 

double iAC(

string symbol, int timeframe, int shift)

Calculates the Bill Williams' Accelerator/Decelerator oscillator.

Parameters:

symbol

-

Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double result=iAC(NULL, 0, 1);

 

double iAD(

string symbol, int timeframe, int shift)

Calculates the Accumulation/Distribution indicator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double result=iAD(NULL, 0, 1);

 

double iAlligator(

string symbol, int timeframe, int jaw_period, int jaw_shift, int teeth_period, int teeth_shift, int lips_period, int lips_shift, int ma_method, int applied_price, int mode, int shift)

Calculates the Bill Williams' Alligator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be one of Timeframe enumeration values. 0 means the current chart timeframe.

jaw_period

-

Blue line averaging period (Alligator's Jaw).

jaw_shift

-

Blue line shift relative to the chart.

teeth_period

-

Red line averaging period (Alligator's Teeth).

teeth_shift

-

Red line shift relative to the chart.

lips_period

-

Green line averaging period (Alligator's Lips).

lips_shift

-

Green line shift relative to the chart.

ma_method

-

MA method. It can be any of Moving Average methods.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

mode

-

Data source, identifier of a line of the indicator. It can be any of the following values:
MODE_GATORJAW - Gator Jaw (blue) balance line,
MODE_GATORTEETH - Gator Teeth (red) balance line,
MODE_GATORLIPS - Gator Lips (green) balance line.

shift

-

Shift relative to the current bar (number of periods back) where the data should be taken from.

Sample:

double jaw_val=iAlligator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORJAW, 1);

 

double iADX(

string symbol, int timeframe, int period, int applied_price, int mode, int shift)

Calculates the Movement directional index and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Averaging period for calculation.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

mode

-

Indicator line index. It can be any of the Indicators line identifiers enumeration value.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

if(iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0)>iADX(NULL,0,14,PRICE_HIGH,MODE_PLUSDI,0)) return(0);

 

double iATR(

string symbol, int timeframe, int period, int shift)

Calculates the Indicator of the average true range and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Averaging period for calculation.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

if(iATR(NULL,0,12,0)>iATR(NULL,0,20,0)) return(0);

 

double iAO(

string symbol, int timeframe, int shift)

Calculates the Bill Williams' Awesome oscillator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double val=iAO(NULL, 0, 2);

 

double iBearsPower(

string symbol, int timeframe, int period, int applied_price, int shift)

Calculates the Bears Power indicator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Averaging period for calculation.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double val=iBearsPower(NULL, 0, 13,PRICE_CLOSE,0);

 

double iBands(

string symbol, int timeframe, int period, int deviation, int bands_shift, int applied_price, int mode, int shift)

Calculates the Bollinger bands indicator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate the indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Averaging period to calculate the main line.

deviation

-

Deviation from the main line.

bands_shift

-

The indicator shift relative to the chart.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

mode

-

Indicator line index. It can be any of the Indicators line identifiers enumeration value.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

if(iBands(NULL,0,20,2,0,PRICE_LOW,MODE_LOWER,0)>Low[0]) return(0);

 

double iBullsPower(

string symbol, int timeframe, int period, int applied_price, int shift)

Calculates the Bulls Power indicator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Averaging period for calculation.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double val=iBullsPower(NULL, 0, 13,PRICE_CLOSE,0);

 

double iCCI(

string symbol, int timeframe, int period, int applied_price, int shift)

Calculates the Commodity channel index and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Averaging period for calculation.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

if(iCCI(NULL,0,12,PRICE_TYPICAL,0)>iCCI(NULL,0,20,PRICE_TYPICAL,0)) return(0);

 

double iCustom(

string symbol, int timeframe, string name, ..., int mode, int shift)

Calculates the specified custom indicator and returns its value. The custom indicator must be compiled (*.EX4 file) and be in the terminal_directory\experts\indicators directory.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

name

-

Custom indicator compiled program name.

...

-

Parameters set (if necessary). The passed parameters and their order must correspond with the desclaration order and the type of extern variables of the custom indicator.

mode

-

Line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer functions.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double val=iCustom(NULL, 0, "SampleInd",13,1,0);

 

double iDeMarker(

string symbol, int timeframe, int period, int shift)

Calculates the DeMarker indicator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Averaging period for calculation.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double val=iDeMarker(NULL, 0, 13, 1);

 

double iEnvelopes(

string symbol, int timeframe, int ma_period, int ma_method, int ma_shift, int applied_price, double deviation, int mode, int shift)

Calculates the Envelopes indicator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

ma_period

-

Averaging period for calculation of the main line.

ma_method

-

MA method. It can be any of Moving Average method enumeration value.

ma_shift

-

MA shift. Indicator line offset relate to the chart by timeframe.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

deviation

-

Percent deviation from the main line.

mode

-

Indicator line index. It can be any of Indicators line identifiers enumeration value.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double val=iEnvelopes(NULL, 0, 13,MODE_SMA,10,PRICE_CLOSE,0.2,MODE_UPPER,0);

 

double iForce(

string symbol, int timeframe, int period, int ma_method, int applied_price, int shift)

Calculates the Force index and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Averaging period for calculation.

ma_method

-

MA method. It can be any of Moving Average method enumeration value.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double val=iForce(NULL, 0, 13,MODE_SMA,PRICE_CLOSE,0);

 

double iFractals(

string symbol, int timeframe, int mode, int shift)

Calculates the Fractals and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

mode

-

Indicator line index. It can be any of the Indicators line identifiers enumeration value.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double val=iFractals(NULL, 0, MODE_UPPER, 3);

 

double iGator(

string symbol, int timeframe, int jaw_period, int jaw_shift, int teeth_period, int teeth_shift, int lips_period, int lips_shift, int ma_method, int applied_price, int mode, int shift)

Gator oscillator calculation. The oscillator displays the difference between the Alligator red and blue lines (the upper histogram) and that between red and green lines (the lower histogram).

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

jaw_period

-

Blue line averaging period (Alligator's Jaw).

jaw_shift

-

Blue line shift relative to the chart.

teeth_period

-

Red line averaging period (Alligator's Teeth).

teeth_shift

-

Red line shift relative to the chart.

lips_period

-

Green line averaging period (Alligator's Lips).

lips_shift

-

Green line shift relative to the chart.

ma_method

-

MA method. It can be any of Moving Average method enumeration value.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

mode

-

Indicator line index. It can be any of Indicators line identifiers enumeration value.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double jaw_val=iGator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_UPPER, 1);

 

double iIchimoku(

string symbol, int timeframe, int tenkan_sen, int kijun_sen, int senkou_span_b, int mode, int shift)

Calculates the Ichimoku Kinko Hyo and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

tenkan_sen

-

Tenkan Sen averaging period.

kijun_sen

-

Kijun Sen averaging period.

senkou_span_b

-

Senkou SpanB averaging period.

mode

-

Source of data. It can be one of the Ichimoku Kinko Hyo mode enumeration.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double tenkan_sen=iIchimoku(NULL, 0, 9, 26, 52, MODE_TENKANSEN, 1);

 

double iBWMFI(

string symbol, int timeframe, int shift)

Calculates the Bill Williams Market Facilitation index and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double val=iBWMFI(NULL, 0, 0);

double iMomentum(

string symbol, int timeframe, int period, int applied_price, int shift)

Calculates the Momentum indicator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator.NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Period (amount of bars) for calculation of price changes.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

if(iMomentum(NULL,0,12,PRICE_CLOSE,0)>iMomentum(NULL,0,20,PRICE_CLOSE,0)) return(0);

 

double iMFI(

string symbol, int timeframe, int period, int shift)

Calculates the Money flow index and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Period (amount of bars) for calculation of the indicator.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

if(iMFI(NULL,0,14,0)>iMFI(NULL,0,14,1)) return(0);

 

double iMA(

string symbol, int timeframe, int period, int ma_shift, int ma_method, int applied_price, int shift)

Calculates the Moving average indicator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Averaging period for calculation.

ma_shift

-

MA shift. Indicators line offset relate to the chart by timeframe.

ma_method

-

MA method. It can be any of the Moving Average method enumeration value.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

AlligatorJawsBuffer[i]=iMA(NULL,0,13,8,MODE_SMMA,PRICE_MEDIAN,i);

 

double iOsMA(

string symbol, int timeframe, int fast_ema_period, int slow_ema_period, int signal_period, int applied_price, int shift)

Calculates the Moving Average of Oscillator and returns its value. Sometimes called MACD Histogram in some systems.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

fast_ema_period

-

Number of periods for fast moving average calculation.

slow_ema_period

-

Number of periods for slow moving average calculation.

signal_period

-

Number of periods for signal moving average calculation.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

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

 

double iMACD(

string symbol, int timeframe, int fast_ema_period, int slow_ema_period, int signal_period, int applied_price, int mode, int shift)

Calculates the Moving averages convergence/divergence and returns its value. In the systems where OsMA is called MACD Histogram, this indicator is displayed as two lines. In the Client Terminal, the Moving Average Convergence/Divergence is drawn as a histogram.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

fast_ema_period

-

Number of periods for fast moving average calculation.

slow_ema_period

-

Number of periods for slow moving average calculation.

signal_period

-

Number of periods for signal moving average calculation.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

mode

-

Indicator line index. It can be any of the Indicators line identifiers enumeration value.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

if(iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0)>iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0)) return(0);

 

double iOBV(

string symbol, int timeframe, int applied_price, int shift)

Calculates the On Balance Volume indicator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double val=iOBV(NULL, 0, PRICE_CLOSE, 1);

 

double iSAR(

string symbol, int timeframe, double step, double maximum, int shift)

Calculates the Parabolic Stop and Reverse system and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

step

-

Increment, usually 0.02.

maximum

-

Maximum value, usually 0.2.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

if(iSAR(NULL,0,0.02,0.2,0)>Close[0]) return(0);

 

double iRSI(

string symbol, int timeframe, int period, int applied_price, int shift)

Calculates the Relative strength index and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Number of periods for calculation.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

if(iRSI(NULL,0,14,PRICE_CLOSE,0)>iRSI(NULL,0,14,PRICE_CLOSE,1)) return(0);

 

double iRVI(

string symbol, int timeframe, int period, int mode, int shift)

Calculates the Relative Vigor index and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Number of periods for calculation.

mode

-

Indicator line index. It can be any of Indicators line identifiers enumeration value.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double val=iRVI(NULL, 0, 10,MODE_MAIN,0);


double iStdDev(


string symbol, int timeframe, int ma_period, int ma_shift, int ma_method, int applied_price, int shift)

Calculates the Standard Deviation indicator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

ma_period

-

MA period.

ma_shift

-

MA shift.

ma_method

-

MA method. It can be any of Moving Average method enumeration value.

applied_price

-

Applied price. It can be any of Applied price enumeration values.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

double val=iStdDev(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,0);


double iStochastic(


string symbol, int timeframe, int %Kperiod, int %Dperiod, int slowing, int method, int price_field, int mode, int shift)

Calculates the Stochastic oscillator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

%Kperiod

-

%K line period.

%Dperiod

-

%D line period.

slowing

-

Slowing value.

method

-

MA method. It can be any of Moving Average method enumeration value.

price_field

-

Price field parameter. Can be one of this values: 0 - Low/High or 1 - Close/Close.

mode

-

Indicator line index. It can be any of the Indicators line identifiers enumeration value.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

if(iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0)>iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,0))

return(0);


double iWPR(


string symbol, int timeframe, int period, int shift)

Calculates the Larry William's percent range indicator and returns its value.

Parameters:

symbol

-

Symbol the data of which should be used to calculate indicator. NULL means the current symbol.

timeframe

-

Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

period

-

Number of periods for calculation.

shift

-

Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:

if(iWPR(NULL,0,14,0)>iWPR(NULL,0,14,1)) return(0);

 

 

 

 

Quick Links