PureBytes Links
Trading Reference Links
|
Hi,
I'm using the following formula to calculate pivot points.
Since I'm using it on forex, the market data starts on sunday
evenning, and since the pivot points are calculated based on previous
day data, the pivots for monday are not calculated correctly, since
sunday data is only a couple of hours.
How can I use sunday data as if it were friday, so that the pivot for
monday is calculated correctly (based on friday and sunday data
together)?
thanks
//---- pivot points
DayH = TimeFrameGetPrice("H", inDaily, -1);// yesterdays high
DayL = TimeFrameGetPrice("L", inDaily, -1);//low
DayC = TimeFrameGetPrice("C", inDaily, -1);//close
DayO = TimeFrameGetPrice("O", inDaily);// current day open
HiDay = TimeFrameGetPrice("H", inDaily);
LoDay = TimeFrameGetPrice("L", inDaily);
PP = (DayH + DayL + DayO + DayO) / 4 ;
R1 = (2 * PP) - DayL;
S1 = (2 * PP) - DayH;
R2 = PP + R1 - S1;
S2 = PP + S1 - R1;
R3 = R2 + (R1 - PP);
S3 = S2 - (PP - S1);
style = styleLine | styleDashed + styleNoRescale;
rcolor = colorBlue;
scolor = colorRed;
pcolor = colorWhite;
Plot(R1, "R1",rcolor,style);
Plot(S1, "S1",scolor,style);
Plot(R2, "R2",rcolor,style);
Plot(S2, "S2",scolor,style);
Plot(PP, "PP",pcolor,style);
Plot(s3, "S3", scolor, style);
Plot(R3, "R3", rcolor, style);
------------------------------------
**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
*********************
TO GET TECHNICAL 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
*********************************
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|