This indicator will add buttons to the Chart Trader which will allow you to quickly change the quantity of the contracts. The buttons can be set to a custom quantity.
Candlesticks are formed by accumulative volume delta. Sell volume is subtracted from buy volume, and is mathematically expressed as: buy (positive values) + sell (negative values).
Buy volume, price divergence: Occurs when price ticks below the starting point price (from indicator running time), and there is accumulated buy volume delta (more buying than selling volume). Current candle's outline and wick is a thick magenta color during this time.
Sell volume, price divergence: Occurs when price ticks above the starting point price (from indicator running time), and there is accumulated sell volume delta (more selling than buying volume). Current candle's outline and wick is a thick cyan color during this time.
Description:
This algorithm is a custom performance index for the Default or Genetic optimization methods in NinjaTrader 7. Optimization with this index maximizes the 20th percentile of noise-injected bootstrapped expectancy. This metric is designed for robustness against worst case conditions. Note that due to the mathematics, the solution is not deterministic (run it multiple times, and you will get slightly different solutions each time).
Installation:
Add this file to your ...\NinjaTrader 7\bin\Custom\Type\ directory, open any indicator or strategy, and compile.
Details (this math is in here):
1. For a given series of trades of length N, the top 10% are removed, creating a modified series of trades of length N*0.9.
2. This modified series of trades is sampled *with replacement* for 10*N*0.9 samples. This series becomes the bootstrapped trade series.
3. Gaussian noise is a given mean and standard deviation is added to each bootstrapped sample.
4. Expectancy for this bootstrapped + noise series is calculated.
5. Steps 2 through 4 are done 5000 times, with different sampling from the Gaussian noise. This creates a distribution of expectancy.
6. Finally, the performance index returns the 20th percentile of these 5000 runs (so, the 1000th worst expectancy) to the NT optimizer.
Discussion:
Removal of the 10% best performing trades is an attempt to be pessimistic by assuming that the best 10% trades observed in the past will never repeat. We do not want total system performance to hang a few high-yielding trades.
Injecting noise to the bootstrapped sample accomplishes two things. First, it adds uncertainty to each bootstrapped series, thereby simulating diversity in the bootstrapped series (hopefully the diversity we would measure in a much larger sample). Secondly, it makes each bootstrap series unique. This means that we way calculate a distribution from the ensemble of bootstrapped series.
Any percentile may be returned. We could return the mean. By returning a value to the left of the mean, the 20th percentile, we are maximizing 80% of the distribution.
Note: Because we are injecting randomly sampled noise to the bootstrapped series, the solution from this performance index is not deterministic!
Suggestions:
If you use this, you should be comfortable changing the parameters found at the top of the algorithm. Adjusting the value of the standard deviation of the noise may make or break the robustness and success of this algorithm.
Shutdown Ninjatrader
Unarchive in the db folder, and place the tick and minute data in the correct folders (Default location is in your Documents folder, not Program Files)
Open Ninjatrader
If you have problems, delete the .sdf file in the Ninjatrader documents folder.
Gold is easy to trade and a good place to start for new traders.
Avoid mini contracts, especially mini forex contracts. They are very expensive and make it unlikely to be a successful trader. Trade a normal forex account if your funds are small, because margins are adjustable, unlike Futures.
This indicator will allow the user to hide and rearrange the Chart Trader buttons within Ninja Trader.
Important: This indicator is just out of the beta stage. There is some important things to know to get it to work properly. Please take 6 minutes to watch the video in the link below. Finally, this changes the default functionality of the Ninja Trader. This was tested with NT7 using the built in SIM account. Use at your own risk!
Simply summates the seconds required to draw a bar. Designed to be used with non-time based bars. Includes 2 horizontal lines, for example can have the 1st line represent 300 seconds (5 minute) and 2nd line set to 60 seconds (1 minute). Bars change to red if the number of seconds exceeds your desired threshold, for example turns bars red if 600 seconds (10 minutes) is exceeded. Includes ability to draw a SMA of the time as well that defaults to a 5 period.
Creates a histogram of volume at price points using an additive 1 tick data series. The histogram can be drawn on the left hand or right hand side of the chart. The color and opacity of the bars can be defined. A scale factor is available to control the amplitude of the peaks and valleys. The volume summation can use all bars of the chart, bars starting at the left hand side of the chart or bars since the last session start as defined by the charts session setting. The summation of volume starts at the designated start bar and continues to summate until a refresh, at which point the starting bar location is redefined based on your settings (beginning of chart, left side of chart, session start). It uses the 1 tick data series volume which can differ slightly from the main bars volume, but it is very close, close enough for a volume profile. The advantage of being based on the 1 tick data series is this indicator will redraw/refresh and does not need an external file for data storage.
I found this in the non-Elite Ninjatrader Strategy downloads posted by @minsalaco who said, "Not my personal work but that I'd share".
Considering the heavy resource requirements to backtest and optimize strategies, and the fact that they are intended to be used as money making tools, not playthings, it is hard for me to understand why many strategies, like the original version of this one, do not use any of the good coding practices that we have been discussing here on BMT for the last two years or so. The person who posted it on BMT did so with good intentions and is not to blame for the deficiencies in the coding.
As an experiment I applied some of those coding ideas to this strategy. It should run about a thousand times better than the original version unless I made some mistakes somewhere.
This strategy was coded with stocks in mind and trades a quantity of 100 by default. Many of the other parameters may also be inappropriate for futures contracts. I ran the latest version A.1 for several hours on CalculateOnBarClose false and it IS workng. It bought 100 cars of NQ at 5:50 AM PT on January 7 at 2708.995 (average overall basis). I sold them manually at 2709.7925 and shut down the strategy because I was afraid that my computer might start talking to SkynetŪ. However, I am sure we would all would appreciate if anyone backtesting this strategy would let me know, and post their results on the forum.
Thanks to user feedback I did some testing and corrected some mistakes that were in the original release. I could not upload the corrected file to the original post but as of 4:26AM Eastern Time on January 7, you can get it here. Replace the original version with this one.
The following text had been copied mostly verbatim from the entry in the Strategies download area but was in dire need of some editing.
Volatility Breakout Pattern Description
The squeeze signals the end of low volatility periods where the market has built up energy for major moves. Periods of low volatility are the times when the Bollinger bands "move closer together". The width of the Bollinger channel is more sensitive to price volatility than the width of the Keltner Channel, so a Keltner Channel and a momentum index oscillator are added, as mentioned in John Carter's book Mastering the Trade. The momentum index oscillator is used to suggest the trade direction. How does this Setup work?
The quiet period is when the Bollinger Channel width decreases to less than that of the Keltner Channel. The trade signal occurs when the Bollinger Channel moves back outside of the Keltner Channel. The value of the 12 period momentum index oscillator suggests whether to go long (oscillator>0) or short (oscillator<0).
Moves tend to be stronger when the BB Width is the lowest over at least the past 150 bars. Also choose BBWidth < 0.05 for better results on daily data.
This strategy includes trailing stop and stop loss as variables, so you can easily backtest and use the optimizer.
This indicator is the basis for the Volatility Breakdown Strategy in the preceding post. There were a lot of changes to make it run MUCH faster, but there are still quite a few more things that could be done.
This time there is a screenshot so you can get an idea of the kinds of conditions this indicator looks for. While it's simplistic, some of the signals do look pretty good.
August 5th, 2014 08:23 AM landau I will give you 3 stars for this one,becahttps://cdn3.bigmiketrading.com/images/smilies/smile.gifuse it sounds like a gr
eat idea. I haven't tried it yet though.
thanx
January 19th, 2013 11:42 AM minsalaco Classless post. Thx for the commentary unrelated to the strategy. Simply posting and noting an Updated Version would h
ave been sufficient. Another example of no good deed goes unpunished.
October 31st, 2015 01:25 PM manualtrader excellent, thank you!
January 27th, 2014 06:49 PM alexJetski amazing thanks
February 13th, 2013 03:12 PM artfuls when I close a workspace and bring it back up and have 3 chart traders up on 3 different charts some come up wright and
some not te buttons are not how i left them....dont no why thanks artfuls
April 28th, 2021 08:43 AM bluedot thanks for the indicator!
January 31st, 2021 05:23 PM Ride the Wind H,
Is their a NT8 Version? I have been looking this feature? Great work.
September 19th, 2018 02:40 PM delta9100 thank you
I was using it for nt7 do you have made oft nt8
December 19th, 2014 12:28 PM Bvend Excellent for spot forex
November 14th, 2013 11:43 AM Mindset Thanks. Very weird you have to declare the same line of code twice for each button - but you do. Must have taken a while