My hdd has suffer substantial failure, after the recovery, most of my custom indicators extracted from stockcentral forum (melt down) has been retrieved from other sources, however below is the Jackson Zone (last value) code composed by Henry 1224 is not workable due to some program error, Cud someone offer help to solve
This is a revised formula for the Jackson zones that only plot the
last value.
It has also been adapted for the day on intraday charts
TF:=Input("1=hour 2=day 3=week 4=month 5=year ",1,5,4);
NW:=If(TF=1,ROC(Minute(),1,$)<0,If(TF=2,ROC(Hour(),1,$)<0, If
(TF=3,ROC(DayOfWeek(),1,$)<0,If(TF=4,ROC(DayOfMonth(),1,$)<0,ROC
(Month(),1,$)<0))));
A1:=Cum(1);
A2:=LastValue(A1-BarsSince(NW>0));
WH:=ValueWhen(1,Nw,Ref(HighestSince(1,Nw,H),-1));
WL:=ValueWhen(1,Nw,Ref(LowestSince(1,Nw,L),-1));
WCL:=ValueWhen(1,Nw,Ref(C,-1));
BP:=LastValue((WH+WL+WCL)/3);
RB2:=If(A1<A2,BarsSince(A1>=A2),LastValue(((WH-WL)*1.382)+BP));
D1:=If(A1<A2,BarsSince(A1>=A2),LastValue((WH-WL)+BP));
RB1:=If(A1<A2,BarsSince(A1>=A2),LastValue(((WH-WL)*.618)+BP));
D:=If(A1<A2,BarsSince(A1>=A2),LastValue(((WH-WL)/2)+BP));
MBP:=If(A1<A2,BarsSince(A1>=A2),LastValue((WH+WL+WCL)/3));
B:=If(A1<A2,BarsSince(A1>=A2),LastValue(BP-((WH-WL)/2)));
SB1:=If(A1<A2,BarsSince(A1>=A2),LastValue(BP-((WH-WL)*.618)));
B1:=If(A1<A2,BarsSince(A1>=A2),LastValue(BP-(WH-WL)));
SB2:=If(A1<A2,BarsSince(A1>=A2), LastValue(BP-((WH-WL)*1.382)));
RB2;D1;RB1;D;MBP;B;SB1;B1;SB2;
Best trading,
Metabully