NinjaTrader 6.5 Strategies
futures io futures trading


Categories Help    

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


Sort by
Filter

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: 123 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:

https://www.ninjatrader.com/support/forum/showthread.php?t=12141

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: 582 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: 1010 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
original
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: 779 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: 866 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:



UPDATE:
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: 1600 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 <www.ninjatrader.com>.
*
* Losely based on GAOptimizer by Pete_S
* https://ninjatrader.com/support/forum/showpost.php?p=30291

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

COMPATIBILITY:
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: 2188 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


COMPATIBILITY:
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: 502 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.

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


September 12th, 2009
Size: 1.01 KB
Downloaded: 308 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:

Quoting 
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:
https://www.vantharp.com/sm-Expectancy.htm

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:
https://www.vantharp.com/products/position-sizing-comparison.htm

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: 364 times

Keywords: tharp van expectancy
 



 
Category
 



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.