MQL4 Reference Technical Indicators iSAR

MQL4 Help as One File:

iSAR

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

double  iSAR(
   string       symbol,            // symbol
   int          timeframe,         // timeframe
   double       step,              // price increment step - acceleration factor
   double       maximum,           // maximum value of step
   int          shift              // shift
   );

Parameters

symbol

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

timeframe

[in]  Timeframe. It can be any of ENUM_TIMEFRAMES enumeration values. 0 means the current chart timeframe.

step

[in]  The step of price increment, usually 0.02.

maximum

[in]  The maximum step, usually 0.2.

shift

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

Returned value

Numerical value of the Parabolic Stop and Reverse system indicator.

Example:

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