Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Indicator to detrend price. Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
ChrisBellis
Posted : Wednesday, March 4, 2015 10:32:22 AM
Registered User
Joined: 10/17/2006
Posts: 58

Hi

I am struggling to write an indicator in TC200 V7, that will plot a Detrend Price Oscillator.

To start i would be using a 21 period moving average and shifting it by 11 periods.

Can someone please give me some guidance on how i would create the indicator.

Thank you i advance

Chris

ChrisBellis
Posted : Wednesday, March 4, 2015 11:33:49 AM
Registered User
Joined: 10/17/2006
Posts: 58

This is what i am currently working with plottted around 0. I am not making much progress.

C-((11/2+1)-avgC11)

It looks nothing like you would expect.

Thanks

Chris

Bruce_L
Posted : Wednesday, March 4, 2015 11:38:32 AM


Worden Trainer

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

We can shift the moving average to the right to do the calculations, but not to the left by plotting the following formula as a Custom Indicator in TC2000 version 7.

C - AVGC21.11

You may want to take a look at the Detrended Price Oscillator for more information about the different ways DPO can be calculated.

We can plot the value of the version where the moving average is shifted left, but it will be plotted at the current bar instead of 11 bars ago.

C11 - AVGC21



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ChrisBellis
Posted : Wednesday, March 4, 2015 11:54:02 AM
Registered User
Joined: 10/17/2006
Posts: 58

Hi Bruce,

sorry i really should have been clearer. Thank you for the link i have read that thread already.

While i'm thinking about what you've said and what i may be able to do with it, i should give you more info on what i want to do. Also, i do use TC200 V12.4 (but prefer v7) and t may be easier to do it in that.

Cheers

Chris

 

"The process to detrend a cycle is simple.
1. Calculate a moving average the same length as the potential Trading Cycle. For
most markets use a 20-bar moving average of the close. But instead of plotting
the moving average on the day of the last calculation, it is centered (or plotted) in
the middle of the cycle. For example, the 20-day moving average is plotted back
10 days from the most recent close. This is called a centered moving average as
it is plotted in the center of the cycle.

2. Subtract the moving average from the high and low of each price bar and plot the
results around a zero line directly below each price bar. The zero line represents
the centered 20-bar moving average.

3. The centered detrend at the bottom of Chart 3 mitigates the effects of trend and
allows the highs and lows of the trading cycle to be easily seen.
This process can be easily programmed into many of the popular trading platforms.

Chart 4 - The chart below has been compressed to show more cycles. The highs and
lows of the centered detrend correspond to the highs and lows of the trading cycle. Most
cycle tops occur above the sell line at .80 and most cycle bottoms occur below the buy
line at -.80. A rise above 2.0 indicates a top is imminent; a bottom is ready to occur if
the detrend drops below -2.0.
If you are thinking that this is the indicator for which you have been searching…
there is one problem. Because the centered detrend lags prices by one-half the length of
the cycle, or 10 bars, the centered detrend is excellent for showing historical cycles, but
cannot be used for real-time trading.
 

Bruce_L
Posted : Wednesday, March 4, 2015 12:02:38 PM


Worden Trainer

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

There really isn't a way to plot that in TC2000 version 7... you can plot the value, but not in the place where you want it to plot (because there is no way to plot the negative offset).

In TC2000 version 12.4, you could create the following Custom PCF Indicator.

C11 - AVGC21

Then add a 1-period simple moving average with an Offset setting of -11 (that is negative 11). I would probably set the Plot Style to Area or Histogram.

You would probably want to click Custom PCF Indicator and select Edit to adjust the Opacity all the way to the left.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ChrisBellis
Posted : Wednesday, March 4, 2015 12:07:37 PM
Registered User
Joined: 10/17/2006
Posts: 58

Sorry Bruce, i've got so far and realised that i want to plot an indicator based upon the above. You have advised me in the past that this has to be done in V12. I'll continue in that.

Cheers

Chris

ChrisBellis
Posted : Wednesday, March 4, 2015 12:08:50 PM
Registered User
Joined: 10/17/2006
Posts: 58

Thaks Bruce. Illl get working on that and get back to you if i come unstuck.

Cheers

Chris

Bruce_L
Posted : Wednesday, March 4, 2015 12:16:18 PM


Worden Trainer

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

You're welcome.



-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.