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 |

New Search Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
cjimr1000
Posted : Saturday, December 27, 2008 1:52:00 PM
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
StockGuy
Posted : Tuesday, December 30, 2008 10:52:49 PM

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.
bustermu
Posted : Wednesday, December 31, 2008 6:14:48 AM
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
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.