Rank: Advanced Member
Groups: Registered, Registered Users Joined: 6/13/2005(UTC) Posts: 52
|
I need a little help with weekly verses daily indicators. In particular writing a weekly SMA and then applying it to a daily chart but this could apply to any indicator.
As far (my understanding) as displaying a weekly chart MS uses actual weekly data (Monday to Friday) as opposed to a running 5 days as a week. If the current week is not complete it looks at the data as a complete week. This way the data is fixed, except for the current week, when using an indicator.
To verifty this I put a MS standard SMA on a daily chart and then switch it to weekly. I could then compare both the raw data and the SMA values that I calculated. For the raw data the opening price was Monday’s opening, the closing price was Friday’s close, the high was the highest price of the week and the low was the lowest price of the week. This was what was expected and verified what I calculated. For the SMA (I use a 5 period of the closing price) the weekly SMA used Friday’s closes. Again, it was expected and verified what I calculated.
I then used the website below to write (Copy) a weekly SMA (Used the 2 noted, Week counter and SMA-close) and the values are different from what MS calculates. HELP! What am I doing wrong?
http://www.metastocktools.com/
Week counter - calendar week counter from 01/01/0001 - count is independent of any missing chart data
SMA–close - weekly Simple Moving Average of week's Close
Prompt Values:Weekly SMA - Close Periods (used 5 to ck results)
End of Week (used 5 for Friday)
Display Mode (used 0 for Static)
PS: Patrick, having a training video on writing weekly, monthly, etc. indicators that are then applied to another time frame might be worthwhile. Even better a MS function that could automatically apply different time frame indicators to the same chart similar to Fibonacci Trader. Of course this is a wish list item. Thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Investorretired
Make sure you are using Jose's "Calendar Day counter", NOT his "Calendar Week counter". You would have had to have changed the Fml() call inside the Weekly SMA, and I can't see you doing that. Worth mentioning all the same.
Write to me at rlarsen@man.quik.co.nz with code copied from your Indicator Builder (not from my original document), and tell me what chart(s) (symbols) and date ranges you're seeing the problem with in your tests. I don't think there's a problem with the indicator, though it does tend to lose accuracy beyond 3 decimal places once the number of daily bars rises. There is a way to get more accurate results when using, say, 3000 or more EOD bars, but the method used on the website versions is still pretty good. How many weeks do you want the SMA to use?
One way or another I should be able to sort out the problem for you.
Roy
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.