Craig:
Your formulas for R1 and S1 give the same plots as the one that uses PREV. But when I stack your R1 through 6 and S1 through 6 formulas and try to plot them in one custom indicator, I don't get plots for S2, S3, S4, etc., only for S1 and R1. I may be doing something wrong. Are you getting lots of levels of support and resistance, or just one for each? With PREV, you get 12 levels.
S1:=ValueWhen(1,Ref(LOW,-4)=LLV(LOW,9),Ref(LOW,-4));
S2:=ValueWhen(1,S1<>Ref(S1,-1),Ref(S1,-1));
S3:=ValueWhen(1,S1<>Ref(S1,-1),Ref(S2,-1));
S4:=ValueWhen(1,S1<>Ref(S1,-1),Ref(S3,-1));
S5:=ValueWhen(1,S1<>Ref(S1,-1),Ref(S4,-1));
S6:=ValueWhen(1,S1<>Ref(S1,-1),Ref(S5,-1));
S1; S2; S3; S4; S5; S6;
Resistance:
R1:=ValueWhen(1,Ref(HIGH,-4)=HHV(HIGH,9), Ref(HIGH,-4));
R2:=ValueWhen(1,R1<>Ref(R1,-1),Ref(R1,-1));
R3:=ValueWhen(1,R1<>Ref(R1,-1),Ref(R2,-1));
R4:=ValueWhen(1,R1<>Ref(R1,-1),Ref(R3,-1));
R5:=ValueWhen(1,R1<>Ref(R1,-1),Ref(R4,-1));
R6:=ValueWhen(1,R1<>Ref(R1,-1),Ref(R5,-1));
R1 and R2 and R3 and R4 and R5 and R6;
R1; R2; R3; R4; R5; R6; |