Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
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
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |