PureBytes Links
Trading Reference Links
|
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 ( inDaily );
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: " + NumToStr( PHigh, 1.2 );
"PLow: " + NumToStr( PLow, 1.2 );
"PClose: " + NumToStr( PClose, 1.2 );
Plot (RPivot,"Rolling Pivot",colorLightGrey);
__._,_.___
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
__,_._,___
|