Rolling pivot afl needed

mastermind007

Well-Known Member
#21
MM

As per what you are saying the entire calculation goes to the previous day , not the current day ?
Yes, I am saying that because of consistency. If 3 day High are 3 day low are taken off considering the current candle, taking close alone from a previous candle seems inappropriate.

Since moving to previous day will give stable values, its better to shift the whole thing ...
 

extremist

Well-Known Member
#22
MM

As per what you are saying the entire calculation goes to the previous day , not the current day ?


See here it is clearly written tht The settlement price is to be taken so it has to be based on the completed 3 days. Excluding the Current day.

And for excluding the Current day better and simple option is to go for Expand last.
 

mastermind007

Well-Known Member
#23


I had seen this in few charts during training and had asked him about it.

In the middle portion of the chart shown above, the Red line is above the blue line. This is saved image from T3B website using a paid subscription.

In NSE charts, I remember seeing this in Sunpharma but cannot seem to find it now
 
Last edited:

extremist

Well-Known Member
#24


See here it is clearly written tht The settlement price is to be taken so it has to be based on the completed 3 days. Excluding the Current day.

And for excluding the Current day better and simple option is to go for Expand last.


In abv graph u can see u will get perfect and stable points for calculation of pivot.

But see bellow


If market breaks tht 3 day hhv or LLv whole model of Pivote will be based on the changing values.
So if u had sell in the morning It may well change to Buy by the afternoon and sell again after mkt fall.

So to base the calculation u need firm levels.

Else as i said earlier u will see the pivot level and all other levels will be seem like repainting.

Resulting useless code some time.

I hope all is clear like foot ball now! :lol:
 

mastermind007

Well-Known Member
#26
Code:
if (Interval() <= inDaily)
{
tf = inDaily;
TimeFrameSet(tf);
threeDayPivot = Ref ( ( HHV(High, 3) + LLV(Low, 3) + Close) / 3, -1);
differentialNumber = (threeDayPivot - Ref(((HHV(High, 3) + LLV(Low, 3)) / 2 ), -1));
TimeFrameRestore();

threeDayPivot = TimeFrameExpand(threeDayPivot, tf, expandLast);
differentialNumber = TimeFrameExpand(differentialNumber, tf, expandLast);

threeDayPivotHigh = threeDayPivot + differentialNumber;
threeDayPivotLow  = threeDayPivot - differentialNumber;
Plot(threeDayPivot, "3DP", colorBlue,    styleThick  | styleStaircase | styleNoLabel);
Plot(threeDayPivotHigh, "3RH", colorBlue, styleDashed | styleStaircase | styleNoLabel);
Plot(threeDayPivotLow , "3RL", colorRed,  styleDashed | styleStaircase  | styleNoLabel);
}
 
Last edited:

amitrandive

Well-Known Member
#27
Code:
if (Interval() <= inDaily)
{
tf = inDaily;
TimeFrameSet(tf);
threeDayPivot = Ref ( ( HHV(High, 3) + LLV(Low, 3) + Close) / 3, -1);
differentialNumber = (threeDayPivot - Ref(((HHV(High, 3) + LLV(Low, 3)) / 2 ), -1));
TimeFrameRestore();

threeDayPivot = TimeFrameExpand(threeDayPivot, tf, expandLast);
differentialNumber = TimeFrameExpand(differentialNumber, tf, expandLast);

threeDayPivotHigh = threeDayPivot + differentialNumber;
threeDayPivotLow  = threeDayPivot - differentialNumber;
Plot(threeDayPivot, "3DP", colorBlue,    styleThick  | styleStaircase | styleNoLabel);
Plot(threeDayPivotHigh, "3RH", colorBlue, styleDashed | styleStaircase | styleNoLabel);
Plot(threeDayPivotLow , "3RL", colorRed,  styleDashed | styleStaircase  | styleNoLabel);
}
Thanks MM
:clapping:
 
#30
MM

Thanks for giving the clue.Seems like a typo in your snippet.

The entire code,

Code:
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
TimeFrameSet(inDaily);
H3=HHV(High,3);
L3=LLV(Low,3);
C3=Ref(C,-1);
H1= Ref(H,-1) ;
L1=Ref(L,-1);
C1= Ref(C,-1);
P3=(H3+L3+C3)/3;
P1=(H1+L1+C1)/3;
Num=(H3+L3)/2;
PD=abs(P1-Num);
RPH=P1+PD;
RPL=abs(P1-PD);
TimeFrameRestore();
Plot(TimeFrameExpand(P1,inDaily,expandFirst),"Daily Pivot",colorPink,styleDots);
Plot(TimeFrameExpand(P3,inDaily,expandFirst),"Rolling 3 Daily Pivot",colorAqua,styleDots);
Plot(TimeFrameExpand(RPH,inDaily,expandFirst),"Rolling Pivot High",colorGreen,styleDots);
Plot(TimeFrameExpand(RPL,inDaily,expandFirst),"Rolling Pivot Low",colorRed,styleDots);
Plot(TimeFrameExpand(Num,inDaily,expandFirst),"Rolling Pivot Low",colorYellow,styleDots);


_SECTION_END();
 

Similar threads