Hi Dhakkan,
In order to refine my scan results I have put in some additional conditions. Could you please modify the afl according to these -
BUY when
+DI crosses DI from bottom to top
+DI crosses ADX from bottom to top but only if DI is lower than +DI
SELL when
-DI crosses +DI from bottom to top
+DI crosses ADX from top to bottom but only if DI is higher than +DI
-DI crosses ADX from bottom to top but only if +DI is lower than -DI
Thanks in advance
Cheers
Abhi
Hi Abhi,
These are simple things, learn AFL .. it will help you, or you may end up reveling all your tricks to others..
Anyway's... edited the AFL and here it is....
Check if it suits your requirement or not...
/////////////////////////////////////////////////////////////////////////////////////
// TEST ADX
_SECTION_BEGIN("ADX TEST");
range = Param("Range",14,3,60,1);
px = PDI(range);
nx = MDI(range);
ax = ADX(range);
// Buy Conditions
bcon1 = Cross(px,nx);
bcon2 = Cross(px,ax)
AND nx < px;
Buy = (bcon1) OR (bcon2);
// Sell Conditions
scon1 = Cross(nx,px);
scon2 = Cross(ax,px)
AND nx > px;
scon3 = Cross(nx,ax)
AND px < nx;
Sell = (scon1) OR (scon2) OR (scon3);
// Explorer
Filter = Buy OR Sell;
AddColumn(Buy,"Buy",1);
AddColumn(Sell,"Sell",1);
// balancing buy sell
///Buy = ExRem(Buy, Sell);
//Sell = ExRem(Sell, Buy);
/// Plots
Plot(px,"+DI",colorGreen,1);
Plot(nx,"-DI",colorRed,1);
Plot(ax,"ADX",colorBlue,5);
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlue);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorDarkRed);
_SECTION_END();