Download MetaTrader 5

Help in display correct iSar Values

To add comments, please log in or register
Venkat ramana
1737
Venkat ramana 2013.09.27 04:33 

     I am trying to get iSar values but its always shows up as 1.0. Pl help to get the correct iSar values. Thx for the help


      double mSar =0.00;

      mSar = iSAR(NULL,0,0.02,0.2,0)>Close[0];
      Alert(mSar);
Andrey Barinov
39269
Andrey Barinov 2013.09.27 05:27  

Hi,

please, refer to CopyBuffer() function.

Documentation on MQL5: Timeseries and Indicators Access / CopyBuffer
Documentation on MQL5: Timeseries and Indicators Access / CopyBuffer
  • www.mql5.com
Timeseries and Indicators Access / CopyBuffer - Documentation on MQL5
PomeGranate
568
PomeGranate 2015.05.27 20:04  
Venkat ramana:

     I am trying to get iSar values but its always shows up as 1.0. Pl help to get the correct iSar values. Thx for the help


      double mSar =0.00;

      mSar = iSAR(NULL,0,0.02,0.2,0)>Close[0];
      Alert(mSar);

Your code doesn't really make sense.

mSar = iSAR(NULL,0,0.02,0.2,0);

Above code should assign correct iSAR value to mSAR. But you're trying to make it a boolean expression, which doesn't work.

Guess you had something in mind like:

double mSar = iSAR(NULL,0,0.02,0.2,0);
if (mSar>Close[0])
Alert("whatever");
Alain Verleyen
Moderator
31090
Alain Verleyen 2015.05.27 20:06  
PomeGranate:

Your code doesn't really make sense.

Above code should assign correct iSAR value to mSAR. But you're trying to make it a boolean expression, which doesn't work.

Guess you had something in mind like:

The question was posted 2 years ago. Thanks to share anyway.
PomeGranate
568
PomeGranate 2015.05.27 20:30  
Alain Verleyen:
The question was posted 2 years ago. Thanks to share anyway.
Haha, I see - you're right. You're welcome anyway! ^^
To add comments, please log in or register