1.97k likes | 2.15k Views
ind1:=MACD(); cond1:=H=HHV(H,255); Cond2:=SAR(.02,.2)>C; cond3:=C>SAR(.02,.2); VW:=ExtFml("ForumDll.VarLLV",MACD(),BarsSince(cond1)); {Cond1 = New 52 week high Cond2 = SAR greater than close} init:=Cum(IsDefined(Cond1+Cond2))=1; bin:=ValueWhen(1,Cond2-Cond1<>0 OR init, Cond2);
E N D
ind1:=MACD(); cond1:=H=HHV(H,255); Cond2:=SAR(.02,.2)>C; cond3:=C>SAR(.02,.2); VW:=ExtFml("ForumDll.VarLLV",MACD(),BarsSince(cond1)); {Cond1 = New 52 week high Cond2 = SAR greater than close} init:=Cum(IsDefined(Cond1+Cond2))=1; bin:=ValueWhen(1,Cond2-Cond1<>0 OR init, Cond2); first:=bin AND (Alert(bin=0,2) OR init); {Cond3 = SAR less than close} init1:=Cum(IsDefined(first+cond3))=1; bin1:=ValueWhen(1,cond3-first<>0 OR init1, cond3); second:=bin1 AND (Alert(bin1=0,2) OR init1)AND VW<-.2; AlmostThere:=Abs(vw*.75)+vw; Cond4:=Cross(MACD(),AlmostThere); init2:=Cum(IsDefined(second+Cond4))=1; bin2:=ValueWhen(1,Cond4-second<>0 OR init2, Cond4); Third:=bin2 AND (Alert(bin2=0,2) OR init2); third AND C>10 AND Mov(V,10,S)>500