
Originally Posted by
mani
dear funyoo
would u please guide me due to a simple SAR trading expert.
it is a while i am trying to create a expert base on Parabolic sar but i couldnt

( please help me by writing a simple sar EA.
Best Wishes
Hi mani and welcome,
I have not the time to teach programmation. I suggest you to learn on mql4.com. The best way to begin to code, is to study the basic moving average or sample macd expert advisor included in Metatrader. Then see in my experts the signal part to understand how we determine if a signal has been generated with the SAR. See especially this part :
Code:
double PSA1=iSAR(NULL,TimeFrame1,Step1,Maximum1,i+1);
double PSA2=iSAR(NULL,TimeFrame1,Step1,Maximum1,i);
double PSA3=iSAR(NULL,TimeFrame2,Step2,Maximum2,i+1);
double PSA4=iSAR(NULL,TimeFrame2,Step2,Maximum2,i);
string SBUY="false";string SSEL="false";
if(PSA1>Open[i+1]&&PSA2<Open[i])SBUY="true";
if(PSA1<Open[i+1]&&PSA2>Open[i])SSEL="true";