PureBytes Links
Trading Reference Links
|
Hi,
Is there a simpler way to offset weekly bars to different days?
In the code below, the "weekly" 5 bars start on Tuesday and end on
Monday instead of Monday to Friday.
weekstart = Ref( DayOfWeek() < Ref( DayOfWeek(), -1 ), -6);
weekend = Ref( DayOfWeek() > Ref( DayOfWeek(), 1), -1);
WeeklyOpen = IIf( weekend, ValueWhen( weekstart , Open ), Null);
WeeklyHigh = IIf( weekend, ValueWhen( weekend, HighestSince(
weekstart, High ) ), Null);
WeeklyLow = IIf( weekend, ValueWhen( weekend, LowestSince(
weekstart, Low ) ), Null);
WeeklyClose = IIf( weekend, ValueWhen( weekend, Close ), Null);
WeeklyVolume = ValueWhen(DayOfWeek() > Ref(DayOfWeek(), 1), Sum( V,
5) );
//Plot( weekstart, "", colorGreen, styleLeftAxisScale);
//Plot( weekend, "", 4, styleLeftAxisScale);
SetChartBkColor( ColorBlack);
PlotOHLC( WeeklyOpen, WeeklyHigh , WeeklyLow, WeeklyClose, "",
colorWhite, styleCandle);
------------------------ Yahoo! Groups Sponsor --------------------~-->
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/0It09A/bOaOAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
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
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/
|