Round2TickSize Function

Posted by admin | Indicators | Sunday 9 November 2008 12:15 am

One very useful function in Ninja Trader is Round2TickSize(). It rounds the price to the nearest tick of the instrument ( stock, futures, etc). I want to give a few examples , just to make it clear. Sometimes people wonder if  Round2TickSize() works by truncating or does it round down. It does neither, it returns the next tick nearest tick price REGARDLESS if it is higher or lower.

 

Now, take the ES 9 S&P Emini 500 ) for example, which has a 0.25 tick size. One half of a tick would be 0.125.

If the foo is 936.37, then  Round2TickSize (936.37) = 936.25 ( 0.12 difference DOWNWARD)

if the foo rises 0.01 to 936.38 , then Round2TickSize (936.38) = 936.5 ( 0.12 difference UPWARD)

And since a picture is worth a thousand words, a table has to be worth something. So here is a table of examples to wrap up this post.

     foo      Round2TickSize
936.37 936.25
936.38 936.5
936.62 936.50
936.63 936.75
936.87 936.75
936.88 937.00
937.12 937.00
937.13 937.25

Ninja Trader Update : Now Includes Dynamic Momentum Index

Posted by admin | Indicators | Friday 31 October 2008 12:47 am

In the latest update, NinjaTrader updated four indicators.

  1. DMIndex
  2. ParabolicSAR
  3. Pivots
  4. DMI

DMIndex

The most signifigant was the addition of the DMIndex. The Dynamic Momentum Index (DMIndex) as developed by Tushar Chande and Stanley Kroll and outlined in detail in their book The New Technical Trader. It is a variable term RSI which makes the RSI more responsive to short-term moves. The more volatile the price is, the shorter the time period is.

ParabolicSAR

The ParabolicSAR no longer a minimum acceleration factor. Before, the factor had a minimum of 0.2. Now, you can use any value such as 0.0 or 0.1, although I do not know why you would.

 

Pivots
Pivots,  only a comment changed.
DMI
The description was changed from The Dynamic Momentum Index to The Directional Movement Index.

Gap Fade Ninjascript Strategy : Five Profitable RIMM Trades In A Row in 10 Days

Posted by admin | Strategy | Tuesday 28 October 2008 4:24 am

Looking at this wild week in the market I decided to look at the old gap trade. The gap trade is fading a gap open, and used to be a staple trade, but in the last few years it has not worked as well.. For example , if a stock opens up 2%, you sell it and hope for the gap to close.

So I coded up a NinjaScript strategy to trade the gap trade and took a look at RIMM. No real reason I picked RIMM, it is just one of those volatile internet type stocks. I have not tested the strategy on other stocks, but feel free to test it out.

Nine trades , all profitable, for a cumulative profit of 21% over the last couple of weeks. I have not done testing on other stocks, but it seems like the gap trade is working now.

Take a look at the image on my right. You can click on it to get a full size image. This is an image of the strategy analyzer, which is backtesting. The total net profit was $9.53 over two weeks which is not bad for a $44 stock. If you will notice that there were five trades, with four long trades in this market. The market has been wild so this strategy has been making long trades after some of these selloffs.

You can download the Gap Trade Strategy here. You need to run NinjaTrader 6.5 which pretty much everyone runs. You do have to register it, but it is mainly so you can read the legal mumbo jumbo that my legal guy wants. You just have to read the license and click ok.

DOWNLOAD Gap Trade Strategy

HOW TO USE THE STRATEGY
[1] The strategy only works on intraday data, not daily data.
[2] There is also only one parameter and that is the percentage of the gap for the trade to occur. So a setting of 2 would be a 2% gap.
[3] The strategy closes all trades at the end of the day.

Volume Spike

Posted by admin | Indicators | Sunday 5 October 2008 12:54 am

This is a pretty good indicator. It looks for exhaustion bars and users those for reversals. The theory is that an exhaustion bar will form on higher volume, then the price will reverse.

This indicator is not designed to be used by itself. If fact, if you use it alone for trading, I think ….. well you know…. you would get taken to the cleaners.

So pair this with Stochastics or MACD , or whatever you wish.

The Big Rename…

Posted by admin | Site Information | Tuesday 30 September 2008 10:20 am

    Well I am finally doing it. I am going to rename all the indicators from TraderWerks…. to TW…..  Personally , I like using the full long name better. It is clearer, but it is also long and annoying. In case you haven’t noticed, the new indicators I have written , have used TW instead of the long name.

     Such is life. All the old indicators that you have downloaded will still work, so no worries. But if you do have any problems, email me or leave a message in the support forum.

Bollinger Bands, %b and BandWidth Indicators

Posted by admin | Indicators | Saturday 27 September 2008 11:35 am

I have had these laying around on my hard drive for a while. I have too many things sitting around on my computer sometimes. For strategy development, that are a much easier way to include Bollinger bands into a Ninja Trader Strategy. Well, I decided to release them in source. 
 

  • %b, pronounced ‘percent b’, is derived from the formula for Stochastics and tells you where you are in relation to the bands. 
  • BandWidth tells you how wide the Bollinger Bands are on a normalized basis.

 

You can read more at the VIX and more blog. I don’t trade VIX options, but I do enjoy Bill Luby’s blog.

DOWNLOAD

TW %b Indicator  twpercentbcs

TW Bandwidth Indicator  twbandwidth

And sign up for the mailing list while you are downloading and stay up to date on any new indicators we release.

IE , Sucks But Works

Posted by admin | Site Information | Thursday 18 September 2008 11:10 pm

Well, we have finally gotten the site to work with IE. Sucks, but we are not really IE people around here. Sure, our site works with Firefox, Chrome, Safari, Conq, Camino, etc….. And now Internet Explorer.

TraderWerks Keltner Channel Indicator

Posted by admin | Indicators | Sunday 31 August 2008 4:14 pm
Click To Enlarge. The default NT Keltner and our Keltner indicator.

Click To Enlarge. The default NT Keltner and our Keltner indicator.

Yes, Ninja Trader already has a Keltner Channel built in. This is our take on the indicator. Our is a little more custimizable. It allows you to select the price type, the ATR length, and all kinds of other goodness. We also let you select the type of moving average you would like to use. Here are the different types of moving average you can select.

  • Simple Moving Average
  • Hull Moving Average
  • Exponential Moving Average
  • Triangular Moving Average
  • VolumeWeighted Moving Average
  • Weighted Moving Average
  • TripleExponential Moving Average
  • This one is a free download until the end of the year. So try it out and let us know what you think. You can down load it here Trader Werks Keltner Channel.

    Acceleration Bands Indicator

    Posted by admin | Indicators | Tuesday 26 August 2008 10:15 pm

    Acceleration Bands are similar to Bollinger bands. They draw two bands around the moving average. Pretty simple , but still effective.

    Narrow Range Market Analyzer Scan

    Posted by admin | Market Analyzer | Saturday 23 August 2008 3:00 am

    I was reading Elitetrader ( yes I read it. You probably do to but do not want to admit it. ) A user was looking for a free stock screener to find stocks in a narrow range. I though it was a good idea, and since NinjaTrader is free, and you can get free end of day data, I decided to make a free narrow range screener. So no need to spend $400 bucks. To use, download the NarrowRange Indicator, and set up Market Analyzer below.

    Click To Enlarge

     

    The formula finds a percentage of the range over a certain period.

                   MAX ( High )
    Range =  ------------------  - 1
                   MAX ( Low )
    

    So we just look at the range over a period, and use that percentage to decide if the range is narrow.

    Click To Enlarge

    So this is what I can up with. It is an indicator that returns a value if the stock has traded in a narrow range for a certain number of periods. This image is of the Dow 30 stocks , scanned to see if any are in a narrow range for the last 30 days. As of today the only stocks that are trading within a narrow range are WMT, MMM, VZ, IBM, T and JNJ.

    The settings are shown in this dialog. The percentage is set as a whole number. So i you were looking for a 10 percent range, you would set this value to 10, as we did here. The indicator returns a value of between 1 and -1. So to hide the display of the non narrow range instruments, I set the reference to zero. The length is 30 and that is how many periods I look back to determine if it is a narrow range or not.

    Finally, so you do not have to do this again, we save this analyzer as a template. This save the stocks in the market analyzer and the column settings so you can simply open up the template to see your scan.

    Click To Enlarge

    Next Page »