- Katılım
- 23 Eki 2020
- Mesajlar
- 1,826
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From: tan ming <reminiscenostalgia__at__hotmail.com> To: equismetastock__at__yahoogroups.com <equismetastock__at__yahoogroups.com> Date: Friday, June 2, 2006, 5:33:59 AM Subject: [EquisMetaStock Group] Weekly Advance Decline Anyone knows how to create weekly advance decline as an indicator? When metastock swtiches to weekly view, it uses the last value of the week. This works for normal indicator. However for number of advance and decline issues, it requires the sum of the total advance or decline issues for the entire week and not just the last value. As such the AD view in weekly chart is not accurate. Tks. Dan =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From: Jose Silva <josesilva22__at__yahoo.com> To: equismetastock__at__yahoogroups.com <equismetastock__at__yahoogroups.com> Date: Friday, June 2, 2006, 8:41:07 AM Subject: [EquisMetaStock Group] Weekly Volume accumulator (was: Weekly Advance Decline) Dan, when daily charts are switched over to weekly periodicity, the Monday-Thursday data then becomes inaccessible to normal processing. On a related note, the code below accumulates Volume/1000 for the week, but only works on daily charts. |
|
Weekly Volume Accumulator { Weekly Volume accumulator v1.0 Accumulates & resets Volume at week's start. CCopyright 2004~2006 Jose Silva. The grant of this license is for personal use only - no resale or repackaging allowed. All code remains the property of Jose Silva. http://www.metastocktools.com } { Data to accumulate - Volume in '000's } dat:=V/1000; { Start data acc - Week's start } start:=DayOfWeek()<Ref(DayOfWeek(),-1); { End data acc - Week's end } end:=PeakBars(1,-start,1)=0; { Start to End flag } init:=Cum(IsDefined(start+end))=1; flag:=ValueWhen(1,start-end<>0 OR init,start); { Accumulate week's data } acc:=Cum(flag*dat); accData:=acc-ValueWhen(1,end,acc); accData:=accData+end*(Ref(accData,-1)+dat); { Plot in own window - daily charts only } accData |
jose '-) http://www.metastocktools.com | |
| |
Source / From: |