Help in display correct iSar Values

 

     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);
 

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
 
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");
 
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.
 
Alain Verleyen:
The question was posted 2 years ago. Thanks to share anyway.
Haha, I see - you're right. You're welcome anyway! ^^
Reason: