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:
September 9th, 2010
Size: 15.05 KB
Downloaded: 589 times
636
wgreenie
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!
August 5th, 2010
Size: 8.92 KB
Downloaded: 1023 times
586
51friend
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
August 4th, 2010
Size: 6.48 KB
Downloaded: 786 times
584
LostTrader
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.
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)
With the help of several sample strategies I found on the NT forum and a little ingenuity, I have put together a fully-automated, advanced strategy which does the following:
1. Only enters between 10:15 AM and 3:15 PM (EST) (allows …
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).
January 25th, 2010
Size: 17.34 KB
Downloaded: 2194 times
303
piersh
Exported using NT Version 6.5.1000.14
################################
v 1.1 - modified December 15, 2009
Summary of changes
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.
Added remarks to better explain the code.
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:
The profit target is hit; or
The stop loss is hit; or
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
December 14th, 2009
Size: 4.15 KB
Downloaded: 510 times
222
koganam
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.
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.iitm.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.iitm.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".
June 28th, 2010 06:34 PM tradewinsahoy Looking at your whipsaw have you thought about adding buttons to toggle so if we only want to take long trades or short
August 13th, 2010 01:38 AM zerosleep Thanks for this strategy.
August 7th, 2010 09:35 PM mainstream Right on man! Can you add a button to turn JUST LONGS a button JUST SHORT TRADES a button NO TRADES.
August 5th, 2010 08:46 AM skyland Would love to see this available for NT-7
August 4th, 2010 06:43 PM tradewinsahoy Hi LossTrader I tried to import the TSS Strategy into Ninjatrader 6.5 but it said it had program errors. Also can you se
t it so if you only want to take long trades or short trades to.