NinjaTrader 7 Indicators - DetrendedPriceOscillator_V2 - DPO_V2
futures io

Categories Help    

NinjaTrader 7 Indicators
Indicators in this section are compatible with NinjaTrader 7

DetrendedPriceOscillator_V2 - DPO_V2 5 *
This version (V2) of the DetrendedPriceOscillator (DPO) provides performance improvements and new features. My thanks to @Zondor for his code enhancements and suggestions.

This indicator has been exported with Ninja Trader 7.0.1000.22.

The version has been modified for use with BBand2_V4 but can be used with V3 except for the ability to be able to keep all of the MAs in sync between the 2 indicators.

A more complete description of the use and purpose of this indicator can be found in the original post contained below.

The V2 changes are as follows:

DPO_V2 provides:

1. Additional MA selections to allow the MAs to be kept in sync with those provided in BBands2_V4.
2. Restructured the code to provide reusable instances of external indicators. (Thank you @Zondor)
3. Provide the mode “Both” which will create both the Fast and Slow plots in the same panel. In this mode there are 3 region colors, Fast, Slow, and the union of the Fast and Slow. The 3rd color is the blending of the selected Fast and Slow colors. (as shown in screen shot with BBand2_V4)
4. The periods for Fast and Slow are now independent parameters to allow for mode switching.
5. The selected period is rounded to an odd number to allow a true midrange number to be used in the DPO algorithm.
6. Added lines (.5, -.5) for possible breakout signal
7. Changed default plot line and region colors for better contrast when the “Both” mode is selected.

Information from original Post follows

This indicator was written to support the strategy described by Barbara Starr, PhD in the July, 2014 edition of Stock & Commodities Magazine in an article entitled Profit With Dual Oscillators & Bands. In the article she describes her technique for trading using a Dual Band Bollinger Band indicator with different standard deviation settings then normally used, and two instances of DetrendedPriceOscillator with different period settings.

She also described that her investigation of the DPO indicators available revealed that depending on the trading platform used there were 2 different formulas used in this oscillator. Ninja Trader does not provide a DPO with their software and although NT tech support provided 2 versions that were posted on their website neither matched the formula in the indicator she described in her article.

The indicator provided here allows the user to:

1. easily configure the visual aspects of two instances of the indicator.
2. choose from multiple MA types.
3. use optional region painting
4. use smoothing

To configure DPOs as shown in the screenshot install 2 instances of the indicator and on the second instance set DPOSpeedRate = Slow. The plot color, region fill color, and the MA period will be set for the slow DPO as shown. The default MA is set to SMA on both.

The screenshot provided shows the 2 instances of the DPO, one fast (9 period) and the other slow (20 period) along with the BBand2_V3 Bollinger Band indicator which has been posted and described separately. Although the BBand2_V3 indicator is shown here any dual Bollinger band indicator may be used with the inner band set to 1 stand deviation and the outer band set to 3 standard deviations.

In Ms. Strarr’s write up when the 9 period DPO price crosses the zero line the price is near the BB mid-range MA, it is a potential entry point for more aggressive traders, whereas when the 20 period DPO crosses its zero line the price is near/on the 1 std. dev. BB line it is a potential entry point for less aggressive traders. She is quick to point out that fake outs can still occur. Also, in her article all of the examples were with stocks and no mention of its effectiveness was mentioned for any other instrument.

I would be glad to provide other information from the article in a separate thread if anyone has interest in experimenting with this strategy, but cannot post the full text of the article. I have not traded live with it yet and have done only limited back testing as of this post.

Change Log:
06/30/2014 Fix minor problem with default colors when switching back and forth between Fast and Slow
Note: Other then on the initial switch from Fast to Slow the period must be changed manually if/when going back.

07/02/2014 Fix problem with changed region paint colors not being retained after workspace or NT is closed.
08/17/2014 Version 2 released.

Category NinjaTrader 7 Indicators 
Suggest other entries I might like
Details: DetrendedPriceOscillator_V2 - DPO_V2
Category: NinjaTrader 7 Indicators 

August 18th, 2014
Size: 57.50 KB
Downloaded: 1568 times


Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada),
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.