I am want to write a EA write using this Advanced ADX indicator...How can I extract the value and color from the indicator...
Buy
ADX color green and (ADX this hour> ADX previous hour)
Sell
ADX color red and (ADX this hour< ADX previous hour)
I have tried out abit in coding on my own. The coding correct with my rule??Help me out here??
thx
sonic
PHP 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}
}