Thanks Amit for supporting once again ..
sorry for not providing buy & sell conditions as it skipped from mind .
If Possible :- 2 Buy Signal ( Differently Colored )
Buy 1 if price closed & trade above Donchian 144 upper band .
Buy 2 if price closed & trade above Donchian 720 upper band .
Sell1 if price closed & trade below Donchian 144 lower band .
Sell2 if price closed & trade below Donchian 720 lower band .
Addition With alert
sorry for not providing buy & sell conditions as it skipped from mind .
If Possible :- 2 Buy Signal ( Differently Colored )
Buy 1 if price closed & trade above Donchian 144 upper band .
Buy 2 if price closed & trade above Donchian 720 upper band .
Sell1 if price closed & trade below Donchian 144 lower band .
Sell2 if price closed & trade below Donchian 720 lower band .
Addition With alert
Needs to be refined by an expert.
Code:
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("DONCHAIN1");
// Plots a 20 period Donchian channel
pds=144;
DonchianUpper =HHV(Ref(C,-1),pds);
DonchianLower = LLV(Ref(C,-1),pds);
DonchianMiddle = (DonchianUpper+DonchianLower)/2;
Plot(DonchianUpper,"DU",colorGreen,styleLine);
Plot(DonchianMiddle,"DM",colorViolet,styleNoDraw);
Plot(DonchianLower,"DL",colorRed,styleLine);
_SECTION_BEGIN("DONCHAIN2");
// Plots a 20 period Donchian channel
pds1=720;
DonchianUpper1 =HHV(Ref(C,-1),pds1);
DonchianLower1 = LLV(Ref(C,-1),pds1);
DonchianMiddle1 = (DonchianUpper1+DonchianLower1)/2;
Plot(DonchianUpper1,"DU1",colorDarkRed,styleThick);
Plot(DonchianMiddle1,"DM1",colorWhite,styleNoDraw);
Plot(DonchianLower1,"DL1",colorRed,styleThick);
Buy=Cross(C,DonchianUpper);
Buy1=Cross(C,DonchianUpper1);
Sell=Cross(DonchianLower,C);
Sell1=Cross(DonchianLower1,C);
Buy=Buy OR Buy1;
Sell=Sell OR Sell1;
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
PopupWindow("Buy : " + FullName(),"BUY", 5, 640*mtRandom(), 480*mtRandom());
PopupWindow("Sell : " + FullName(),"SELL", 5, 640*mtRandom(), 480*mtRandom());