[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Volatility exits



PureBytes Links

Trading Reference Links

I want to draw two lines on my chart to use for stops. The following kind 
of works, but I want the lines to never decrease, and today's chart for 
INTC shows the lines drooping. Can you tell what I've done wrong?

Thanks,

Mike


Dir:= Mov(C, 10, E) - Mov(C, 11, E);
Dir1:= Ref(Mov(C, 10, E) - Mov(C, 11, E),-1);

s2:=HHV(H, 5) - 2*ATR(10);
s21:=Ref((HHV(H, 5) - 2*ATR(10)),-1);
ss2:=LLV(L, 5) + 2*ATR(10);
ss21:=Ref((LLV(L, 5) + 2*ATR(10)),-1);

If( dir>=0, If(dir1<0,s2,Max(s2,s21)), If(dir1>=0,ss2,Min(ss2,ss21)));

s4:=HHV(H, 5) - 4*ATR(10);
s41:=Ref(HHV(H, 5) - 4*ATR(10),-1);
ss4:=LLV(L, 5) + 4*ATR(10);
ss41:=Ref(LLV(L, 5) + 4*ATR(10),-1);

If( dir>=0, If(dir1<0,s4,Max(s4,s41)), If(dir1>=0,ss4,Min(ss4,ss41)));