PureBytes Links
Trading Reference Links
|
Dear All,
the below formula displays the weekly prices from Monday to friday.
Can anyone help me change it to sunday till thursday.
Pls help me
thx
----------------------------------------------------------
firstday = ValueWhen( Cum(1)==1, DayOfWeek() );
numweek = IIf(firstday==1, Cum( DayOfWeek() < Ref(DayOfWeek(),-1) ),
IIf(firstday>1, Cum( DayOfWeek() < Ref(DayOfWeek(),-1) )+1 , 0 ));
numweek = IIf(IsEmpty(numweek),1,numweek);
firstbar = LastValue(Cum(1))-LastValue(numweek)+1;
dayRef = 5-LastValue(DayOfWeek()) + 4*( Cum(1) - LastValue(Cum(1)) );
xxx = Min(0,5-LastValue(DayOfWeek()) + 4*( Cum(1) - LastValue(Cum
(1)) ));
wo = IIf(IsEmpty( Ref(DayOfWeek(),-DayOfWeek()) ),
ValueWhen(DayOfWeek()==firstday,O), ValueWhen(DayOfWeek()==1,O ) );
wh = HHV(H,Min(DayOfWeek(),5));
wl = LLV(L,Min(DayOfWeek(),5));
wc = C;
weeko =Ref(wo,xxx);
weekh = Ref(wh,xxx);
weekl = Ref(wl,xxx);
weekc = Ref(wc,xxx);
PlotOHLC(weeko ,weekh ,weekl ,weekc," open= "+ weeko+ "
high= "+weekh + " low= "+ weekl + " close= " +weekc,colorBlack,
styleCandle);
-------------------------------------------------------------------
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/
|