% Bands This indicator plots 3 lines on the price chart Pds:= Input("EMA Periods?",1,1000,21); Pct:= Input("Percentage Bands?",0.1,10,5); MA:= Mov(C,Pds,E); TBnd:= MA*(1+Pct/100); LBnd:= MA*(1-Pct/100); MA;TBnd;LBnd; *****% Bands Count***** Plot this indicator in it's own window {Name: %BandsCount} Pds:= Input("EMA Periods?",1,1000,21); Pct:= Input("Percentage Bands?",0.1,10,5); MA:= Mov(C,Pds,E); TBnd:= MA*(1+Pct/100); LBnd:= MA*(1-Pct/100); IUp:= (H > TBnd) * Ref((H <= TBnd),-1); CntUp:= IUp + BarsSince(IUp=1) * (H > TBnd); IDn:= (L < LBnd) * Ref((L >= LBnd),-1); CntDn:= IDn + BarsSince(IDn=1) * (L < LBnd); CntUp; -CntDn;