I am want to write a EA write using this Advanced ADX indicator...
Buy
ADX color green and (ADX this hour> ADX previous hour)
Sell
ADX color red and (ADX this hour< ADX previous hour)
thx
sonicPHP Code:
for (i = Bars - 205; i >= 0; i --)
{
double adx1 =iCustom(NULL, 0, "Advanced_ADX",13,0,i);
double adx2 =iCustom(NULL, 0, "Advanced_ADX",13,1,i);
if ((adx1[i]>adx2[i])&&(adx1[i+1] > adx1[i]) // BUY
{ BUY routine}
if ((adx1[i]<adx2[i])&&(adx1[i+1] < adx1[i]) // SELL
{ SELL routine}
}
No comments:
Post a Comment