Download MetaTrader 5

how to use iSAR() to get the value,can get a example?

To add comments, please log in or register
Xianba Xia
2368
Xianba Xia 2014.02.27 05:33 

As docs said: https://docs.mql4.com/indicators/isar 

int  iSAR(
   string       symbol,            // symbol
   int          timeframe,         // timeframe
   double       step,              // step
   double       maximum,           // maximum value
   int          shift              // shift

   );

that return a int value,but i need a double value like below.

how to use iSAR() to get a double Value.like this.

Value of iRSA 

thank you. 

MQL4 Documentation
  • docs.mql4.com
MQL4 Documentation
Vladimir Karputov
Moderator
49430
Vladimir Karputov 2014.02.27 06:21  
scuxia:

As docs said: https://docs.mql4.com/indicators/isar 

int  iSAR(
   string       symbol,            // symbol
   int          timeframe,         // timeframe
   double       step,              // step
   double       maximum,           // maximum value
   int          shift              // shift

   );

that return a int value,but i need a double value like below.

how to use iSAR() to get a double Value.like this.

 

thank you. 

The documentation for iSAR() mistake. iSAR() returns double.
enbo lu
Moderator
1950
enbo lu 2014.02.27 07:20  

In MQL5:

 

Then use CopyBuffer() to read the value out. 

Vladimir Karputov
Moderator
49430
Vladimir Karputov 2014.02.27 07:37  
luenbo:

In MQL5:

 

Then use CopyBuffer() to read the value out. 

The question was on MQL4, and not on MQL5.
Alain Verleyen
Moderator
31134
Alain Verleyen 2014.02.27 10:48  
Question about mql4/MT4 have to be posted on mql4.com forum. This forum is about MT5/mql5.
Rodrigo Malacarne
Moderator
9947
Rodrigo Malacarne 2014.02.27 14:04  

iSAR is used to define the indicator handle, and as such it must be an integer value !!!

You can then create the indicator buffer, which will actually be a double value !!!

This is how it works in MQL5. I don't know how it works with MQL4, but I think the idea is the same... 

Automated-Trading
Admin
100933
Automated-Trading 2014.02.27 14:53  
scuxia:

As docs said: https://docs.mql4.com/indicators/isar 

int  iSAR(
   string       symbol,            // symbol
   int          timeframe,         // timeframe
   double       step,              // step
   double       maximum,           // maximum value
   int          shift              // shift

   );

that return a int value,but i need a double value like below.

In MQL4 the iSAR() function returns value of double type. The documentation will be fixed.
Vladimir Karputov
Moderator
49430
Vladimir Karputov 2014.02.27 15:44  
Automated-Trading:
In MQL4 the iSAR() function returns value of double type. The documentation will be fixed.
Thanks!
To add comments, please log in or register