
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I'm developing an EA and have run into a roadblock, and am in need some help. If anyone can provide sound advice it would surely be appreciated!
The following IF tests is running in an EA on a 5M chart and fails consistently, even when I have phsyically verified the data as being correctly setup on the 5M, 15M and 30M charts. What am I doing incorrectly?
int digits = MarketInfo(Symbol(),MODE_DIGITS);
if(NormalizeDouble(iSAR(NULL,PERIOD_M5,0.02,0.2,0),digits) < NormalizeDouble(iOpen(NULL,PERIOD_M5,0),digits))
{
if(NormalizeDouble(iSAR(NULL,PERIOD_M5,0.02,0.2,1),digits) > NormalizeDouble(iOpen(NULL,PERIOD_M5,1),digits))
{
if(NormalizeDouble(iSAR(NULL,PERIOD_M15,0.02,0.2,0),digits) < NormalizeDouble(iOpen(NULL,PERIOD_M15,0),digits))
{
if(NormalizeDouble(iSAR(NULL,PERIOD_M30,0.02,0.2,0),digits) < NormalizeDouble(iOpen(NULL,PERIOD_M30,0),digits))
{
Print("made it here");
}
}
}
}
Thanks for your help.
Andy