Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 92 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
|
1 user thanked MS Support for this useful post.
|
|