Trendline Breakout Trading System
Trendline Breakout Trading System
Trendline Breakout Trading System
com
_SECTION_BEGIN("Pattern_Recognition_with_Shading");
//Pattern Recognition graph with shading
/*TRENDLINES BREAKOUT*/
x = Cum(1);
per = Param("Percent",3,1,5,1);
s1=L;
s11=H;
dtS =endt-startt;
aS = (endS-startS)/dtS;
bS = endS;
DTR=ENDT1-STARTT1;
aR = (endR-startR)/dtR;
bR = endR;
BEGIN=Min(STARTT,STARTT1);
TRS = IIf(x>BEGIN-10,trendlineS,-1e10);
TRR = IIf(x>BEGIN-10,trendlineR,-1e10);
Condcolor=(Cross(C,trendlineR) AND X>ENDT1) OR (Cross(trendlineS,C) AND
X>ENDT);
BarColor=IIf(Condcolor,7,1);
Plot(C,"Close",BarColor,styleCandle);
Plot(TRS,"Support",colorYellow,styleLine);
Plot(TRR,"Resist",colorYellow,styleLine);
/////////////////////////////////////
// Shading //
////////////////////////////////////
fill=Param("style",2,1,2,1);
style=IIf(fill==1,styleHistogram,IIf(fill==2,styleArea,Null));
Plot(x,"",colorLightGrey,style);
Plot(trr,"",colorPink,style);
////////////////////////////////////////////
///////////////////////////////////////////
Lowline=Ends-starts;
Highline=endr-startr;
///////////////////////////////////
//////////////////////////////////
BullishBreakout=Cross(C,trendlineR);
BearishBreakout=Cross(trendlineS,C);
/////////////////////////////////////
// Automatic Analysis //
////////////////////////////////////
AddTextColumn(WriteIf(bullishbreakout,"bullish Breakout",""),"BullBreak");
AddTextColumn(WriteIf(bearishBreakout,"Bearish Breakout",""),"BearBreak");
AddTextColumn(WriteIf(ascendingtriangle,"Ascending
Triangle",WriteIf(decendingtriangle,"Decending
Triangle",WriteIf(Wedge,"Wedge",WriteIf(DownChannel,"Down
Channel",WriteIf(UpChannel,"Up Channel",WriteIf(BroadeningWedge,"Broadening
Wedge","")))))),"Pattern");
AddColumn(C,"Close");
_SECTION_END();