Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 12/27/2008 Posts: 3
|
I need to create 2 similar searches.
The first search:
1) Sort by the stock price crossing a 30 day weighted moving average with envelopes.
2) Adding a detrended price oscillator below the sort.
The second search:
1) Sort be the detrended price oscillator crossing into negative or positive territory.
2) Adding the stock price , 30 day weighted moving average and envelopes below the sort.
Thank You
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
Detrended Price Oscillator is not available in TeleChart. I'm not sure how to create it using a PCF (or if it's even possible). DPO is available in the StockFinder indicator library.
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
The Detrended Price Oscillator (DPO) is usually described by something like:
1) Center a Simple Moving Average (SMA) of Period P by shifting it to the left.
2) Subtract the centered SMA from the Close.
The problem ussually occurs in deciding how far to shift the SMA to the left in order to center it. The correct answer is shift the SMA of Period P to the left (P-1)/2 bars in order to center it.
We will assume that P is a positive odd integer so that (P-1)/2 will be a nonnegative integer. The most recent available value of the DPO is (P-1)/2 bars ago. Its form for Daily bars is:
C((P-1)/2) - AVGCP
Please notice that the most recent value is obtained by shifting C to the right (P-1)/2 bars and leaving AVGCP unshifted.
For example, the most recent value for a DPO of Period 21 ( 10 days ago) is given by the PCF:
C10 - AVGC21
If you wish to observe Closing Prices and DPO21 synchronized, please plot the following Custom Indicators:
1) Indicator Formula:
C10
2) Center Zero Line: Check
Indicator Formula:
C10 - AVGC21
Thanks,
Jim Murphy
|
|
Guest-1 |