NinjaTrader 6.5 Strategies
futures io

Categories Help    

NinjaTrader 6.5 Strategies
Strategies in this section are compatible with NinjaTrader 6.5

Sort by

Show full/short entries Entries
Volatility and Volume Calculator 5 *
Calculates average volume and volatility for each hour on each day.
You must run it from Monday to any Friday (more weeks the better) on 60 minute TF.
It creates an excel file in NT root.
Suggest other entries I might like
Details: Volatility and Volume Calculator

September 21st, 2010
Size: 2.79 KB
Downloaded: 124 times
Sling Shot
I believe many members use certain types of MAs and the subject may be useful to assess a set up. I'm glad to find it from the NJ Forum and Roonius is the generous creator. Thanks Roonius.

You will find more details from the following thread:

It's cool to have the Sling Shot plotted on a blank chart. Enjoy!
Suggest other entries I might like
Details: Sling Shot

September 9th, 2010
Size: 15.05 KB
Downloaded: 586 times
A profitable MaCross system 5 *
3 months ago, i start to program customized indicators and strategies on NinjaTrader6.5 and MetaTrader4. This MaCross system combined with MACD indicator is my recent work. Today i back tested this strategy with 15-Minute bars chart, testing date from 2010-04-21 to 2010-08-05, parameter setting just keep default. Attached picture is the test result, the net profit(except commission) is $8475.

Maybe you can find better setting for this strategy. Cheers!
Suggest other entries I might like
Details: A profitable MaCross system

August 5th, 2010
Size: 8.92 KB
Downloaded: 1011 times
TSS_Strategy 4 *
This is essentially my first strategy. It uses TSSuperTrend as an entry setup trigger and a trailing profit line. It was derived from dsraider's Advanced Sample Strategy and shares some of those traits.
The inputs are profit target ticks, initial stop ticks, TSS multiplier, BE & Trail parameters.
The chase limit and times to trade are not inputs, got to change in code.
  • Entries use StopLimit orders usually.
  • Only have one active position open at a time
  • Cancels entry order if market moves "chase Limit #=3" ticks away from limit order without filling
  • No scaling
Uses TSSuperTrend 2.3 but does not include it - you must already have it. I am unsure of the ethics regarding repackaging of his indicator & therefore will not. That means the zip file is ONLY the strategy .cs file which must be placed in your \My Documents\NinjaTrader 6.5\bin\Custom\Strategy folder.

Exported with NT 6.5-16. Not recommended for NT7.

v1 - 8/4/2010
v1.1 - 8/6/2010
fixed minor typos, tracking issues with COBC=false
Suggest other entries I might like
Details: TSS_Strategy

August 4th, 2010
Size: 6.48 KB
Downloaded: 780 times
Elder Impulse System Strategy 4 *
An implementation of the Elder Impulse trading system. Includes support for a second, higher time frame period for determining trend and momentum. The background is painted pink when the higher time frame trend and momentum is down, and green when it is up. The rules for entering and exiting a trade are described here on Investopedia.
Suggest other entries I might like
Details: Elder Impulse System Strategy

May 31st, 2010
Size: 5.59 KB
Downloaded: 868 times

Keywords: elder impulse shodson strategy system
SampleAdvancedAutomatedStratv1.1 5 *
This is a sample template for a fully automated strategy which does the following:

1. Only enters between 10:15 AM and 3:15 PM (EST) (allows for second time frame as well)
2. Shuts down if PnL is more than $1,000 or less than -$300
3. Enters limit orders for long and short based on signal
4. Covers three time frames but will only have one active position open at a time
5. Cancels entry order if market moves four ticks away from limit order without filling
6. Sets an initial stop at 12 ticks, then changes to breakeven at +4 ticks and trails, tick by tick, from there
7. Scales out of half position at +4 ticks (1st profit target) and covers second half position at +8 ticks (2nd profit target)

Use this thread for comments or requests:

v.1.1 - 2/23/10
1. Fixed CancelOrder() code.
2. Added arrows and chart name plots (since plots will only show on main chart, this lets you know which time frame just took the trade).
Suggest other entries I might like
Details: SampleAdvancedAutomatedStratv1.1

February 9th, 2010
Size: 4.71 KB
Downloaded: 1604 times
PH Genetic Optimizer v1.12 4 *
Please see this thread for instructions/discussion.

* PH Genetic Optimizer
* Copyright (c) 2009, Piers Haken
* v1.0 - 6/17/2009
* Initial Release
* v1.01 - 6/20/2009
* Add Walkforward checkbox
* More suitable defaults
* v1.02 - 6/21/2009
* BastTestFrom date hack for detecting walkforward
* v1.03 - 6/21/2009
* added support for Enum parameters
* v1.04 - 7/16/2009
* added support for bool parameters
* dump best DNA at end
* v1.05 - 7/23/2009
* fix #combinations display
* v1.06 - 7/26/2009
* use decimal for #combinations calculation
* v1.07 - 9/1/2009
* don't create parameter definitions for non-primitive types
* v1.08 - 1/25/2010
* NT7 support
* split common stuff into separate file
* v1.09 - 1/25/2010
* fix 'abort'
* v1.10 - 4/3/2010
* various fixes
* v1.11 - 4/7/2010
* moved to separate namespace to avoid conflicts
* v1.12 - 4/9/2010
* added MaximumPerformance cutoff
* Portions copyright (C) 2006, NinjaTrader LLC <>.
* Losely based on GAOptimizer by Pete_S

NOTE: please ignore the '1.09' in the filename. the zip you download here will always be the latest version.

NinjaTrader 6.5: YES
NinjaTrader 7.0: YES

See also NinjaTrader 7 Strategies 
Suggest other entries I might like
Details: PH Genetic Optimizer v1.12

January 25th, 2010
Size: 17.34 KB
Downloaded: 2189 times
Avoid Same Bar Whipsaws v1.1 3 *
Exported using NT Version 6.5.1000.14


v 1.1 - modified December 15, 2009

Summary of changes
  1. Changed defaults for targets and stops, after queries indicated that most users were using the default 1 tick while evaluating v1.0, which naturally resulted in 1 bar whipsaws.
  2. Added remarks to better explain the code.
  3. Added notes to initial description, to explain what the strategy does.

Released with no copyright.

It is free to use for any purpose.

This is demonstration of how to set up a strategy that will not whipsaw trades on the same bar as entry. I seemed to have that problem with a lot of the strategies that I wrote that were designed to reverse in the market if conditions reversed, which is why I wrote this, as an example template.

The strategy keeps you always in the market until either:
  1. The profit target is hit; or
  2. The stop loss is hit; or
  3. Market conditions reverse.
Either of the first 2 exit conditions takes you flat; the 3rd condition causes an immediate reversal from long to short, or short to long, as the case may be.

To stay always in regardless, use excessively large stops and targets.

By using this code, you accept all responsibility for any results that may occur. This is not a recommendation to use the code to trade any equity in a live market.

Any investments, trades and/or speculations using this code are made solely at your own risk, financial or otherwise. Results will be dependent on market conditions, timing and your trading style.

If you disagree with these conditions, please do NOT use the code.

!!!!! Translation: You are responsible for your own investment decisions. Not anyone else. YOU !!!!!

To Import
1. Download the attached file to your desktop
2. From the Control Center window select the menu File > Utilities > Import NinjaScript
3. Select the downloaded file

NinjaTrader 6.5: YES
NinjaTrader 7.0: NOT TESTED [feedback]
Suggest other entries I might like
Details: Avoid Same Bar Whipsaws v1.1

December 14th, 2009
Size: 4.15 KB
Downloaded: 505 times
Bardata Export (like for Excel)
This is a very simple strategy that will export the OHLC to a text file. The file path is hard coded because I was lazy and wrote this a long time ago, so open the code and change it or it won't work for you.

While you're in there, you'll see it is easy to get it to write any data you wish.

Suggest other entries I might like
Details: Bardata Export (like for Excel)

September 12th, 2009
Size: 1.01 KB
Downloaded: 310 times

Keywords: excel bar data bardata export
Expectancy - Van Tharp 3 *
This is another Optimizer Type for backtesting. This is the Max Expectancy formula by Van Tharp.

Elliott Wave is the author.

Here is a quote from Anagoge about the method:

I think this expectancy formula is a useful measure for some things (risk/reward analysis, position sizing, etc.), but I'm not sure it is a good general way to rank/select trading strategies. The reason is that it does not take into account the profit per day (number of trades). Using only expectancy as a ranking, a single trade per year gaining $100 would be ranked better than a strategy that earns $75 per trade with hundreds of trades per year. One quick and dirty way to make the expectancy consider the number of trades is to multiply it by the square root of the number of trades. I implemented a basic expectancy optimizer type a few weeks ago, and went this route, though I had to add in some multipliers to get the weighting the way I wanted it, and still wasn't that happy with it.

The most common formula I see quoted for expectancy is this:
Expectancy = (Probability of Win * Average Win$) - (Probability of Loss * Average Loss$)

Van Tharp describes expectancy here only in reference to R-multiples of a hard stop loss, so the max risk can be calculated for every trade:

For NT, we won't always have a hard stop, so some alternative/conditional formula will likely be necessary. He also suggests a minimum of 30 trades, but recommends 100 or more before calculating a value. A NT version might have to fudge on that requirement, or it could return 0 for less than 30 trades, but that might confuse some people.

The information here states he has a simplified expectancy formula on his DVDs, so maybe that is what people are quoting for the other formulas based on average losses, since it is easier to calculate:

I don't have Van Tharp's books, so I don't know for sure how he describes expectancy there.

I think Van Tharp's SQN formula is one useful way to rank general trading systems. There is a version of it here in the forums, but I have not analyzed it yet. A validated version of that would be a great addition to NT 7, but my first choice would be annual and monthly Sortino ratios.

To install this you need to copy the cs file to Documents\NinjaTrader 6.5\bin\custom\Type and then compile anything or reload Ninja. You'll then have a new option in backtesting for "max expectancy".
Suggest other entries I might like
Details: Expectancy - Van Tharp

July 26th, 2009
Size: 1.68 KB
Downloaded: 365 times

Keywords: tharp van expectancy
SQN - System Quality Number (Van Tharp) 1 *
This is Van Tharp's System Quality Number (SQN) optimizer type for NinjaTrader. Place the SQN.cs file in your Documents\NinjaTrader 6.5\bin\custom\Type directory and then exit and reload Ninja.

Here is information from Ragingbull on SQN:

The only way to seriously qualify and optimize any system is through its System Quality Number (SQN). I advice you to refer to Van Tharp for reference on the subject.

Assuming a set of N trades (N>30 for being statistically significant), SQN is defined as follow:

SQN= Squareroot(N) * Average (of the N Profit&Loss) / Std dev (of the N Profit&Loss).

The large the N, the more trading opportunities you have.
The large the average P&L, the better you are obviously.
The smaller the Std dev (P&L), the more regular are your results and the smaller are the drawdowns.

Note here that if you optimize for the largest SQN, you maximize in fact the product N*average P&L and you minimize the Std dev (P&L) and the drawdowns at the same time.

This is exactly what all good traders should be looking for their system.

The code itself was written by Pete S all credit to him.

If you want more information on the SQN (System Quality Number) or Van Tharp you can look here:

To use this you need to use Strategy Analyzer and change your "Optimize on..." selection to "my system quality number". This is where you normally choose max net profit, or max profit factor, etc.

Update: here is version 1.3
Suggest other entries I might like
Details: SQN - System Quality Number (Van Tharp)

July 25th, 2009
Size: 3.29 KB
Downloaded: 715 times

Keywords: number quality sqn system tharp van
no details  
Suggest other entries I might like
Details: SharkyMAStrategy

June 25th, 2009
Size: 39.67 KB
Downloaded: 368 times

Keywords: ma sharky systrader
some strategies for back test 0 *
I have realized 4 strategies that you can use on ES, TF, NQ and YM market.

EnterDailyHighLow: breakout strategy that enter if the price is upper or lower t max e min day betwenn 20:30 and 21:30 (italian time). You can set stop loss and profit target.

LtitExsternalSignal: you can set price entry (long or short) stop loss and profit target.

TheBestTimeToCatchTrends_ES: enter in the market if the price is > (long) or <(short) of the open price at 19:00 (italian time). You can set stop loss and profit target. If someone can back test it I'm very pleasure.

TradingThePitLastTrend: enter in the market to follow the latest trend of the day at 22:06 and exit at 22:14. you can set stop loss and profit target. I use it in real in TF market and I have realized, with a stop loss of 120$ and profit target of 350$, 384$ of profit witht 1 lot between 11 May until 11 june with a 70% af a positive day. Now I he set a stop loss of 80$ and a profit target of 120$ with 2 lots.

I will posted in this forum the week result starting of today.

If someone can back test it i'm very pleasure.


edit: one .zip for the four strategies.
Suggest other entries I might like
Details: some strategies for back test

June 15th, 2009
Size: 12.24 KB
Downloaded: 510 times
Simple ZeroLagOfZerolag Strategy 3 *
First Simple Version of DoubleMA Trading Strategy ... with SlopeMA and Angle ...
Later i will insert Signal[0] as filter ... or not
Use genetic optimizer, but do not over parametrize ...
Simple Steps are better

i use 4 range on eurusd (small spreads), but i think on es work better ...

i trade manuel, use this for curve fitting on range and thanks to roonius on renko my sideway filter ...

Best regards
Suggest other entries I might like
Details: Simple ZeroLagOfZerolag Strategy

June 12th, 2009
Size: 3.56 KB
Downloaded: 1006 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.