Hi All,
I am trying plot line on every pivot and below is the formula I am using for it
and the output comes as below.
So after pivot 1, the same line should be extended till pivot 2 bar. Here it is not the case. Someone Please help me?
Thanks
I am trying plot line on every pivot and below is the formula I am using for it
Code:
HPH = Ref(H,-3) < Ref(H,0) AND Ref(H,-2) < Ref(H,0) AND Ref(H,-1) < Ref(H,0) AND Ref(H,1) < Ref(H,0) AND Ref(H,2) < Ref(H,0) AND Ref(H,3) < Ref(H,0);
LPL = Ref(L,-3) > Ref(L,0) AND Ref(L,-2) > Ref(L,0) AND Ref(L,-1) > Ref(L,0) AND Ref(L,1) > Ref(L,0) AND Ref(L,2) > Ref(L,0) AND Ref(L,3) > Ref(L,0);
HPHV = ValueWhen(HPH,H,0);
LPLV = ValueWhen(LPL,L,0);
Plot(HPHV, "PH", colorBlue,styleStaircase|styleThick|styleDashed);
Plot(LPLV, "PL", colorBlue,styleStaircase|styleThick|styleDashed);
So after pivot 1, the same line should be extended till pivot 2 bar. Here it is not the case. Someone Please help me?
Thanks
Last edited: