Hello,
I cannot figure out how to get the following indicator to plot correctly using
TimeFrameExpand. It always seems to go to the next days value on the last bar
of the previous day. I am looking at this on ES futures, but it should be the
same on stocks. Regardless of the time frame I have selected, 5min, 15min,
30min, etc. the indicator staircases to the next days value on the last bar of
the day. Doesn't matter if you are looking at 24 hours or day session. It could
probably be fixed with x-shift, but that wouldn't be the proper fix because
PClose is being calculated improperly.
Also, is there any way to get rid of the staircases in a line and just have the
horizontal values, ie., just a horizontal line for each day.
Thanks in advance,
James
SetFormulaName ("Rolling Pivot");
TimeFrameSet
RollPer = Param("Period", 3, 1, 20, 1);
PHigh = HHV(Ref(H,-1),RollPer);
PLow = LLV(Ref(L,-1),RollPer);
PClose = Ref(C,-1);
RPivot = (PHigh + PLow + Pclose)/3;TimeFrameRestore
RPivot = TimeFrameExpand( Rpivot, inDaily );"PHigh: ""PLow: ""PClose:
"Plot(RPivot,"Rolling Pivot",colorLightGrey); + NumToStr( PClose, 1.2 ); +
NumToStr( PLow, 1.2 ); + NumToStr( PHigh, 1.2 );();( inDaily );