August 27th, 2014
Size: 50.30 KB
Downloaded: 478 times
1587
yuriyhozda
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: Date_______Description
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.
August 18th, 2014
Size: 57.50 KB
Downloaded: 1588 times
1567
Cheech
Notice:
There has been a performance upgrade made to this indicator contributed by @Zondor (thank you) and uploaded on 8/22/2014 at 11:00 PM PDT. Before installing this update the old version must be removed. It is not a critical change and although the upgrade is suggested it may be skipped. No other enhancements are included.
This is an enhancement to the BBand2_V3 to address the performance issue raised by @Zondor in the previous release It also includes several other enhancements as described below. More descriptions can be found in the original V3 post below.
This indicator has been exported with Ninja Trader 7.0.1000.22.
1. The code base used for this version to solve the performance issues was the BollingerUniversal indicator written by @FatTails.
2. Three different modes are available, Universal, BBand2, BBand2DPO.
Universal Mode will allow the indicator to operate and appear the same as anaBollingerUniversal.
BBand2 and BBand2DPO work like BBand2_V3 with the exceptions as described starting in number 3.
BBand2 and BBand2DPO mode
3. All of the MA options in Universal mode are available.
4. The Universal MA color scheme can be used including the coloring of the candles (a separate option). If this option set to false the BBand2 colors are used for both modes, with the exception of the swapping of the touch regions colors which are swapped as before.
5. The dark background option is no longer supported
6. The touch region painting can be set to signal on either a wick or candle body touch. Note: This is not significant for non-time based charts on entry to a zone as there is no wick, however it could be significant on exit if the there is a tail.
7. A threshold can be specified for how many ticks the candle (or wick) must penetrate (or remain in) the zone before the touch region is painted (or painting is stopped) as shown in screen shot.
8. The candle direction (up/down) must match the zone being entered before the touch region is painted (as shown in screen shot). Options 6-8 are intended to reduce the number of false signals on entry or give an early warning (6 & 7) of a potential exit from a zone.
9. The mid-line is the same style for both modes.
10. The signal line is now available in BBand2DPO mode.
11. There are individual parameters to specify the standard deviation for each mode
The original V3 information follows:
This is an enhancement to the BBand2_V2 with color indicator which was revised by @trendwaves and written by an unnamed author. The indicator was revised to serve two different uses, as follows:
When used as the basic BBand2 indicator the following revisions were made:
1. Eliminated redundant MA calculations.
2. Added the ability to control the displaying of the inner and outer MA lines without altering Plot parameters.
3. Added the ability to turn off the region band filling (except for the touch display).
4. Added several other MA choices. The selected MA is applied to the mid, inner, and outer bands.
5. Added an optional VWMA signal line.
6. A dark background option that alters the region color and opacity to allow for better visibility when used with dark backgrounds.
The second purpose is when it is used in conjunction with 2 instances of the DetrendedPriceOscillator (DPO) posted separately.
Using this option (DPOUse set to “true”) does not change any of the BB formulas however, it changes both the parameters used in them and the visual aspects of the BBand2_V3 indicator as follows:
1. Signal line is disabled
2. The display aspects of the middle MA are de-emphasized ( a thin, dashed, light gray line)
3. The inner to outer band region painting is disabled
4. The DPO standard deviation values are used instead of the normal BB values.
5. The inner and outer band touch colors are swapped.
6. The alarms have been disabled
Notes:
1. This option was not designed to switch back and forth between the two modes but only to allow for quickly setting up the BB2 indicator for use with the DPO indicators.
2. Any other two band BB indicators can be used with the DPO indicators. The inner and outer standard deviations should be set to 1 and 3 respectively.
More information on it use is presented in the DPO post.
The DetrendedPriceOscillator (DPO) has also been updated to be in sync with this indicator. More information is available in the DPO_V2 post.
Change Log Date______Description
07/02/2014 Fix problem with changed region paint colors not being retained after workspace or NT is closed.
08/17/2014 Version 4 released.
08/22/2014 Performance upgrade released. No change in version number.
August 18th, 2014
Size: 63.31 KB
Downloaded: 1146 times
1568
Cheech
The standard, free DM indicator measures both the direction and strength of a trend (or lack thereof). In addition to showing ADX (which only measures strength) DM also shows trend directional components (up / down).
This Multi-timeframe DM Indicator allows trend assessment at a glance right next to the price bar. It can be used to show current chart DM information, but it's real power is to show DM from a higher-level guide chart on the trigger chart.
The number and color codes can be used to determine:
Strength of trend
Direction of trend
Whether the trend is strengthening or weakening
DM is useful (particularly with data from a higher-level guide chart) in both trend and reversal trading.
Trend trades:
Can warn that the trending level is too low for successful trend trading
Can be used as part of the trigger
Reversal trades:
Can warn that the trending level is too high for successful reversal trading
Like any indicator, it is best used with other indicators and price-action to find confluences.
Re the comment on resource usage -- this was my fault not the programmer's. I wanted to be able to decide instantly when the situation was changing. I have a mega i7 that does nothing but trade and has no problem with anything I throw at it (at least so far). If computer resources are a problem, the indicator can be set to "CalculateOnBarClose=True" (see the Data settings in the picture above) to avoid evaluating each incoming tick, but it could cost a a tick/pip or so on the entry now and then. I day-trade with an average hold time of about 28 minutes so I can't afford to wait for bar closes. For longer-term trading, you'd definitely want to use "COBC=True."
August 7th, 2014
Size: 7.32 KB
Downloaded: 892 times
1579
fishfry
Toggles session break lines on and off for a cleaner chart when doing your analysis / trading.
Thanks to others who had coded the toggle buttons for other indys. Uses unsupported code for NT. Nothing sinister just ChartControl stuff and PlotSessionBreaks.
Updated 16th February 2015 : Zscore_v3
1. Added code to prevent 'out of valid range error' (picked up by Harry - thank you).
2. Changed condition for permission bar coloring.
3. Enabled option to show 1st Std Dev line.
4. Minor visual enhancements and tidied up the code.
For use in sideways or range bound markets.
You can save a few bob if you don't want to pay for a custom profile tool.
The z-score is used to compute the probability of occurrence of a value in a particular normally distributed range OR shows how many Standard deviations away from the mean is a value. If a value is 2 std dev from the mean and you have a nearly normal distribution then 95% of values within that distribution lie above/below your current value in other words there is a good probability that price will revert to the mean and this could be good place to look for a trade back to it or beyond it.
I have shown the volume profile for reference but you can see that this range is normally distributed.
The z-score indy is set to the range of your distribution in ticks. The yellow areas are turning points 2 std dev from the mean and offer the highest probability trades with the lowest risk but the red area turns out not to be worth trading and the z-score helps you stay away from the ambiguity this price action depicted in real time. (HL followed by a LH and then another HL).
v2.0 for NT7
v3.0 for NT7 (current)
Many have asked me for the custom Market Profile tool - you may find it here:
July 31st, 2014
Size: 6.94 KB
Downloaded: 2235 times
1577
Stocktrader
I know I have seen an indicator like this before on BMT, but I was asked to create this by someone recently so I figured I would post it for the rest of BMT. This indicator is meant for not time based bar types such as Renko or Range. It will report the average time of the bars over the last period in Sec. It will also present the time of the current bar for comparison. If the Sec are less than the alarm limit, it will paint that bar Green and a gray strip into the primary chart.
Summary:
Red Trace: Average time in Bars/Sec over period
Light Blue: Time of current bar in seconds
Green/Gray Strip: Alarm limit reached
This indicators allows you to enter user defined values, display them as horizontal lines and trigger alerts within a zone of several ticks or units around these lines.
The indicator will automatically show up on the price panel. It can display up to 10 different alert lines. Each of the lines can be activated individually via the indicator dialogue box.
Sound alerts: When sounds are enabled, the indicator will generate sound alerts when one of the lines is approached. Sound files can be selected individually for each of the 10 alert lines.
E-mail alerts: When e-mails are enabled, the indicator will generate e-mail alerts when one of the lines is approached. For the e-mail feature you need to enter the sending and the destination e-mail via indicator dialogue box, and NinjaTrader should be enabled for sending e-mails under Tools -> Options -> Misc
Enabling lines: First enter an alert level and a label, then activate the line. Each line can be activated individually.
Trigger options: Cross_Above, Cross_Below & Cross_Above_Or_Below.
Offset in ticks: Allows to trigger an alert prior to the crossing of the line.
Rearm time: Can be set to avoid permanent triggering of alerts.
Line Alerts On Indicator:
The indicator can be used on other indicators and triggers an alert when the indicator value approaches the alert level. The referenced indicator should be used as the input series, and anaLineAlertsOnIndicator should be applied to the appropriate indicator panel manually.
Sound alerts: When sounds are enabled, the indicator will generate sound alerts when one of the lines is approached. Sound files can be selected individually for each of the 10 alert lines.
E-mail alerts: When e-mails are enabled, the indicator will generate e-mail alerts when one of the lines is approached. For the e-mail feature you need to enter the sending and the destination e-mail via indicator dialogue box, and NinjaTrader should be enabled for sending e-mails under Tools -> Options -> Misc
Enabling lines: First enter an alert level and a label, then activate the line. Each line can be activated individually.
Trigger options: Cross_Above, Cross_Below, Cross_Above_Or_Below, Larger_Than, Smaller_Than. The last two options should be used with histogram indicators such as volume.
Offset value: Allows to trigger an alert prior to the crossing of the line. The offset amount refers to the indicator scale.
Rearm time: Can be set to avoid permanent triggering of alerts.
Update July 28, 2011: Value 0 will be no longer displayed, if no values are entered for the second line. Number of lines reduced to 10. This is no restriction, as the indicator can be applied several times.
Update July 29, 2011: As lots of users tried to apply the lines to other indicators, I have added a version adapted for use with indicators.
Update August 3, 2011: Alert logic modified. Alert will fire when line is touched (offset = 0), or when a value is printed within the alert range (offset > 0).
Update December 7, 2011: A different sound file can now be selected for each of the lines. The user interface is improved.
Update September 20, 2012: For LineAlertsOnPrice option added to differentiate between Cross_Above and Cross_Below, for LineAlertsOnIndicator further option added for histograms, that is Larger_Than or Smaller_Than, new option added for e-mail alerts.
Update March 21, 2014: Small bug removed, indicator occasionally threw exceptions.
Update April 20, 2014: Values for price labels are now correctly display for interest futures in '16 / '32.
Update July 19, 2014: LineAlertsOnIndicator did not display all lines, when some of the alerts were disabled. Bug removed. LineAlertsOnPrice was not affected.
November 3rd, 2014 09:29 PM lr40pilot Thank you for all the time and effort! Truly a great tool.
August 31st, 2014 06:19 PM RedFox33 Thank you very much!
August 27th, 2014 10:18 AM matthoffman Hey, I printed out the article and I'm experimenting with this idea. Kinda choppy right now so not seeing the best resul
ts from it but, hope real soon to get better testing conditions. Thanks for your great work!
September 1st, 2014 02:07 PM crs247 Thank you very much for sharing your work.
August 13th, 2014 07:57 PM stargazer55 Very interesting indicator, just started using it.
August 9th, 2014 10:14 PM Zondor Good idea, but a resource hog because of "inline" calls to DM indicator on every incoming tick. This is a horrible way t
o code as discussed in "hints for optimizing C# code" thread a few years ago.
August 9th, 2014 06:59 PM landlady54 thanks for a fantastic indicator; works well