ADX (+DI & -DI) crossover Analiser required

#1
Respected Seniors,

Please help to provide the Amibroker code based on following criteria :

1. It will generate the buy signal when +DI line crosses above -DI line.

2. It will generate the sell signal when -DI line crosses above +DI line.

3. It will show the ADX value.

Thanks in advance!!!!

Regards,
Puneet Gaur
 

singhboy

Active Member
#2
_SECTION_BEGIN("ADX");
// ADX/DMI Indicator
range = Param("Periods", 14, 2, 200, 1 );
Plot( ad = ADX(range), _DEFAULT_NAME(), ParamColor( "ADX color", colorBlue ), ParamStyle("ADX style", styleThick ) );
Plot( pd = PDI(range), "+DI", ParamColor( "+DI color", colorGreen ), ParamStyle("+DI style") );
Plot( md = MDI(range), "-DI", ParamColor( "-DI color", colorRed ), ParamStyle("-DI style") );
A= PDI(range);
b= MDI(range);

Buy= Cross(a,b)

;
Sell= Cross(b,a)

;
Filter=(Volume>50000) AND (Buy OR Sell) AND (Close>50);
AddColumn(Close,"Close",1.4);
AddColumn(Buy,"buy",1.2);
AddColumn(Sell,"sell",1.2);
 

singhboy

Active Member
#4
this code is for scanning, not for chart drawing
 
#5
worldastro
add the the following lines at the end of the code

PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlue,0,Graph1);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed,0,Graph1);

vidyasagar

(remove spaces in first line after colorBl and in secondline after colo
 
Last edited:

Similar threads