hhv(h,20);
llv(l,20);
ae:SMA(hhv(h,20),20,1);
be:sma(llv(l,20),20,1);
aa1:=wma(c,2);
bb1:=ema(aa1,2);
a:=ma(bb1,3);
aa2:=wma((h+c+o)/3,18);
dd3:=a>=aa2 and c>aa2;
dd4:=a<aa2 ;
dd5:=a>aa2 ;
STICKLINE((dd4 or dd5) and o<=c ,h,l,0.5,0),Color00cc99;
STICKLINE((dd4 or dd5) and o<=c ,c,o,7,0),Color00cc99;
STICKLINE((dd4 or dd5) and o>=c ,h,l,0.5,0),Color3F8C3A;
STICKLINE((dd4 or dd5) and o>=c ,c,o,7,0),Color3F8C3A;
STICKLINE((dd3 or c>aa2) and o<=c,c,o,7,0),Colorred;
STICKLINE((dd3 or c>aa2) and o<=c,h,l,0.5,0),Colorred;
STICKLINE((dd3 or c>aa2) and o>=c,c,o,7,0),Colorff33ff;
STICKLINE((dd3 or c>aa2) and o>=c,h,l,0.5,0),Colorff33ff;