View Single Post
  #1 (permalink)  
Old 11-03-2005, 06:54 PM
quksilver quksilver is offline
Junior Member
 
Join Date: Oct 2005
Posts: 14
quksilver is on a distinguished road
Rolling Indicators?

Has anyone tried to progam a rolling indicator? What I mean by that is an indicator that performs a higher time frame calculation on lower time frame data to update the indicator more frequently.

i.e. An indicator on a weekly chart takes weekly price data to calculate the indicator. There's only one new data point each week, so it only updates once a week. A rolling indicator might take daily data, perform the calculation over the whole week, and update every day.

The idea is to get a more responsive indicator. One of the complaints about TSD is that it takes too long to recognize changes in trend. A rolling indicator is one of the ideas being tossed around that might help improve TSD's trend determination.

For example, OsMA on a weekly chart takes an array containing the weekly close prices. It then calculates a couple MAs, subtracts them to get MACD, performs another MA on the resulting array (MACD) to get the signal line, then subtracts the two arrays (MACD-signal) to get OsMA.

The corresponding Rolling OsMA would behave similarly, but it would have to use daily price data. That's the tricky part. You have to construct an array of price data on which to calculate the initial MAs and get MACD. What price data does that array need to contain?

My first thought was that it should be an array of the current Close[0] price, Close[5], Close[10], ad naseum. But that only works for the current bar. You wouldn't want to use that array for the previous bar, instead you'd want an array that started with the previous bar and went back every 5 bars. So the array would have to be reconstructed for every single bar. Well, if you follow that logic, you just end up with an array of daily close prices. Perhaps one array for every day of the week would work. But then you need some logic in there to identify which array to update on which day. And that won't necessarily be representative of the market because there would be a disconnect from one day's values (and the value 5 days ago) and the next day's values (which would want to compare the value 4 days ago).

Maybe I'm thinking myself in circles. I'd really like to get some other folk's ideas on how this might work and how it might be coded.

Regards,
-lcg
Reply With Quote