logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
MS Support  
#1 Posted : Friday, July 28, 2017 7:28:52 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 91 times
Was thanked: 155 time(s) in 150 post(s)

Sylvain Vervoort's article, “Price Projections”, included his version of the daily pivots.  This formula is designed to change "days" when the Coordinated Universal Time (UTC or GMT) shows midnight.  The formula prompts the user to enter their time zones UTC adjustment.  If the indicator is being plotted on a daily or higher interval, the UTC adjustment is not used.

The formulas for this indicator is listed below: 

Code:
rollmod:= Input("Coordinated Universal Time (or UTC) adjustment", -12, 13, -5);
rolltime:= If(rollmod >= 0, rollmod, 24-rollmod);
roll:= If(rolltime = 0, Hour() < Ref(Hour(),-1), 
    Hour() < rolltime AND Hour() >= rolltime);
intraday:= LastValue(Max(Cum(Hour())<>0, Cum(Minute())<>0) >0);
new:=If(intraday, roll, ROC(DayOfWeek(),1,$)<>0);
yh:=ValueWhen(1,new, Ref(HighestSince(1,new,H),-1));
yl:=ValueWhen(1,new, Ref(LowestSince(1,new,L),-1));
yc:=ValueWhen(1,new, Ref(C,-1));

pp:=(yc+yh+yl)/3; r1:=(pp*2)-yl; s1:=(pp*2)-yh; r2:= pp+r1-s1; s2:= pp-r1+s1; r3:= pp+r2-s2; s3:= pp-r2+s2;

r3; r2; r1; pp; s1; s2; s3;

Edited by user Friday, July 28, 2017 8:42:37 PM(UTC)  | Reason: Not specified

thanks 1 user thanked MS Support for this useful post.
bherm1782 on 6/26/2018(UTC)
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.