Exploration help required - ADX going higher from 14 - 20

#1
Hello

Can someone pls help me to write a code to Scan all stocks for which ADX is going from 14 - 15 - 16 -17 - 18 -19 - 20 and rising higher, irrespective whether +DI or -DI is higher (in the direction of the trend).

I am able to scan the stocks which are higher than a specific value (anywhere betn 14 - 20), but dont know how to scan the RISING ADX stocks.

Thanking you in advance.

warm regards...rbhapkar
 
#2
Try AND condition with Ref of ADX of past few days.
like:

ADX(14)=20 AND
Ref(ADX(14),-1)=18 AND
Ref(ADX(14),-2)=16 AND
Ref(ADX(14),-2)=14

No. of days to look back & logical operator (= or > or < ) can be adjusted as per your need.

Regards,
 
#3
Dear Pankaj

Thanks for finding time to reply.
However, I had 2 queries:
1) For your condition -
ADX(14)=20 AND
Ref(ADX(14),-1)=18 AND
Ref(ADX(14),-2)=16 AND
Ref(ADX(14),-2)=14
"Will the last 2 not change -2 to incremental number? Or will they remain as -2 only?"
2) How do I check the incremental comparison ? i.e. how to check whether the ADX is increasing or not? I mean what would be the condition?

Thanks in advance.

warm regards...rb
 
#4
1) sorry for the typo last Ref(ADX(14),-2)=14 should have been Ref(ADX(14),-3)=14
2) Incremental comparison can be checked by
ADX(14) >Ref(ADX(14),-1) AND
Ref(ADX(14),-1) >Ref(ADX(14),-2) AND
Ref(ADX(14),-2) >Ref(ADX(14),-3)

regards,
 
#6
Hello abcpankag,
iam new to amibroker usage.pl give me tha afl for EMA crossover and filtering condition for ADX indicator. I back tested EMA crossover, but i read somewhere that entry filers with ADX works well. Please give the AFL.

Thank u very much
 

KelvinHand

Well-Known Member
#7
Hello

Can someone pls help me to write a code to Scan all stocks for which ADX is going from 14 - 15 - 16 -17 - 18 -19 - 20 and rising higher, irrespective whether +DI or -DI is higher (in the direction of the trend).

I am able to scan the stocks which are higher than a specific value (anywhere betn 14 - 20), but dont know how to scan the RISING ADX stocks.

Thanking you in advance.

warm regards...rbhapkar
Don't know why you want to do that.
Give you 2 options.
1- Scan from between 14-20
2- Scan for 20-19-18-17-16-15-14

Goto PARAMETER to switch the option yourself.

The column will display adx0, adx1, ... adx6

analysis yourself, how good can that kind of sequence appear to you.

Good Luck

Code:
iOption = ParamToggle("Scan", "14~~~20|14-15~~19-20|", 1);

range = Param("ADX Periods", 14, 2, 200, 1 );



iADX = ADX(range);

ADX0 = int(iadx);
ADX1 = int(Ref(iADX, -1));
ADX2 = int(Ref(iADX, -2));
ADX3 = int(Ref(iADX, -3));
ADX4 = int(Ref(iADX, -4));
ADX5 = int(Ref(iADX, -5));
ADX6 = int(Ref(iADX, -6));



if (iOption==0)
Cond_ADX = iADX>=14 AND iadx<=20;
else
Cond_ADX = ADX0==20 AND ADX1==19 AND 
            ADX2==18 AND ADX3==17 AND
            ADX4==16 AND ADX5==15 AND
            ADX6==14;


Buy=  Cond_Adx;
Filter = Buy;


SetOption("NoDefaultColumns", True );
AddTextColumn( Name(), "Symbol");
AddTextColumn( FullName(), "Symbol Name",1.2, colorDefault,colorDefault,200);
AddColumn( DateTime(), "Date", formatDateTime, colorDefault,colorDefault, 70 );

AddColumn(ADX0, "adx-0", 1.2);
AddColumn(ADX1, "adx-1", 1.2);
AddColumn(ADX2, "adx-2", 1.2);
AddColumn(ADX3, "adx-3", 1.2);
AddColumn(ADX4, "adx-4", 1.2);
AddColumn(ADX5, "adx-5", 1.2);
AddColumn(ADX6, "adx-6", 1.2);
 
Last edited: