Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Using rolling time periods vs calendar time periods? Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jchas
Posted : Tuesday, August 14, 2018 4:35:18 PM
Registered User
Joined: 11/4/2016
Posts: 28

Looking to use built-in and custom PCF indicators based on a *rolling* month period (instead of calendar months). e.g. The most recent candle would represent the month-long period ending on today.  Want to use monthly moving averages etc based on this rolling timeframe so that all candles represent an equal amount of time, even in the first few days of a new calendar month  

Is this possible?

.../john 

Bruce_L
Posted : Tuesday, August 14, 2018 4:52:01 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

It is possible, but you would need to use a daily time frame and manually expand out many of the calculations.

For example, a 10 period monthly moving average based on rolling 21-trading day months would be the following.

(C + C21 + C42 + C63 + C84 + C105 + C126 + C147 + C168 + C189) / 10

The open of the curent month would be:

O20

The high of the current month would be:

MAXH21

The low of the current month would be:

MINL21

And the close of the current month would be:

C



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jchas
Posted : Tuesday, August 14, 2018 5:12:14 PM
Registered User
Joined: 11/4/2016
Posts: 28

I was afraid of that.

I was hoping there'd be a way to use built-in Hull moving averages and a way to calculate Heiken-Ashi monthly bars with rolling monthly periods. (I believe Hull and H-A calculations use a lot of historical data). 

Thoughts?

Bruce_L
Posted : Wednesday, August 15, 2018 10:42:25 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The big limitation is going to the 500 bars (or 501 after the trading day starts) of daily data available in TC2000 if you want to calculated indicators requiring a lot of data (like exponential moving averages). That and some indicators just can't be easily manually expanded.

Monthly HA isn't all that bad to calculate (but you can't display the resulting calculations as HA candles). It requires expanding an exponential moving average, but the period is only three and can be calculated fairly accurately using relatively few terms (I used ten in this case).

Open:

.12512219 * (O41 + MAXH21.21 + MINL21.21 + C21 + .5 * (O62 + MAXH21.42 + MINL21.42 + C42 + .5 * (O83 + MAXH21.63 + MINL21.63 + C63 + .5 * (O104 + MAXH21.84 + MINL21.84 + C84 + .5 * (O125 + MAXH21.105 + MINL21.105 C105 + .5 * (O146 + MAXH21.126 + MINL21.126 + C126 + .5 * (O167 + MAXH21.147 + MINL21.147 + C147 + .5 * (O188 + MAXH21.168 + MINL21.168 + C168 + .5 * (O209 + MAXH21.189 + MINL21.189 + C189 + .5 * (O230 + MAXH21.210 + MINL21.210 + C210))))))))))

High:

GREATEST(MAXH21, .12512219 * (O41 + MAXH21.21 + MINL21.21 + C21 + .5 * (O62 + MAXH21.42 + MINL21.42 + C42 + .5 * (O83 + MAXH21.63 + MINL21.63 + C63 + .5 * (O104 + MAXH21.84 + MINL21.84 + C84 + .5 * (O125 + MAXH21.105 + MINL21.105  C105 + .5 * (O146 + MAXH21.126 + MINL21.126 + C126 + .5 * (O167 + MAXH21.147 + MINL21.147 + C147 + .5 * (O188 + MAXH21.168 + MINL21.168 + C168 + .5 * (O209 + MAXH21.189 + MINL21.189 + C189 + .5 * (O230 + MAXH21.210 + MINL21.210 + C210)))))))))))

Low:

LEAST(MINL21, .12512219 * (O41 + MAXH21.21 + MINL21.21 + C21 + .5 * (O62 + MAXH21.42 + MINL21.42 + C42 + .5 * (O83 + MAXH21.63 + MINL21.63 + C63 + .5 * (O104 + MAXH21.84 + MINL21.84 + C84 + .5 * (O125 + MAXH21.105 + MINL21.105  C105 + .5 * (O146 + MAXH21.126 + MINL21.126 + C126 + .5 * (O167 + MAXH21.147 + MINL21.147 + C147 + .5 * (O188 + MAXH21.168 + MINL21.168 + C168 + .5 * (O209 + MAXH21.189 + MINL21.189 + C189 + .5 * (O230 + MAXH21.210 + MINL21.210 + C210)))))))))))

Close:

(O20 + MAXH21 + MINL21 + C) / 4

You can't use the built in Hull moving average, but it can be manually expanded as well. It uses a bit more data than simple or front weighted moving averages of the same period, but less than exponential moving averages of the same period. Hull moving averages are a lot more complicated to try and manually expand than the other built in moving average types however (expansions for quite a few periods a available in the forums which would help in creating these conversions).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

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.