Cobra II 30 Year Treasury Bonds

Cobra II 30 Year Treasury Bonds

An Automated Trading System for Tradestation and NinjaTrader

Cobra Bonds II is a trend following automated trading systems for Bond futures designed in August 2011.  We modified the existing strategy Cobra Bonds (formerly Viper Bonds) to use stop order entries instead of limit orders and to hold positions until five minutes before the electronic close.  It is a trading strategy that works on both Tradestation and NinjaTrader.  The strategy can also be set though the StopOrder input to enter into trades using market orders.

The result is an improved strategy for automated trading based on an increased average profit per trade. Stop orders help us with automation since limit orders may or may not get filled and cancelling and replacing the limit order as soon as it is placed (to a market order) will add slippage almost every time.  Buy limit orders placed at the bid when cancelled and replaced to a market order will hit the offer.  It is possible to test a trading system by adding the criteria that limit orders are not filled until the price trades through the limit order by at least 1 tick.  The problem with this is that there are times when limit orders get filled in real time trading where the back test did not represent that trade since it only traded at the bid but did not trade through the bid/limit order price on long trades or through the offer/limit price for short trades.

Stop orders can actually get less slippage (if limit orders are cancelled and replaced at the market) since the buy stop price can be at the offer while the sell stop price can be at the bid.  In our experience, about half the time, the stop order gets 1 tick of slippage while half of the time it does not.  For US Treasury Bond futures, this can create an average slippage and commission scenario of 1 tick + 1 round turn commission or $31.25 + $5 = $36.25.

Market orders can also be used by changing the StopOrder input to 0 (instead of 1 for stop orders).  Back testing shows that stop orders show better performance than limit orders and market orders show better performance than stop orders.  Our default setting for this strategy enters at the market.  Approximately, half the time the market will be at the offer and half the time the market will be at the bid.  Even when using market orders, our experience shows that half the time we get slippage while half the time we do not.

Over the last three years, Cobra II Bonds has averaged $106 average trade profit. The screen shot for the performance summary is from 10/18/2008-10/18/2011 and does not include slippage or commission.

Cobra Bonds II

Cobra Bonds II Lease Now$50/month

Below are the input settings for Cobra II Bonds

Cobra II Bonds Trading System Settings

  1. cntrcts – the number of contracts to trade
  2. MaxDailyEntries – the maximum number of daily entries that will be taking during the day session
  3. StopOrder – set this to 1 to use stop entry orders at the close +/- StopPoints (next input).  Set to 0 for marker orders – default
  4. StopPoints – this input works when setting StopOrder (previous input) to 1 and is the number of points (ex: 1 = 1/32) that the market add/subtract from the close of a 5 minute bar for a stop order entry.
  5. LongStartTime – the time the strategy will start taking long trades
  6. LongStopTime – the time the strategy will stop taking long trades
  7. ShortStartTime – the time the strategy will start taking short trades
  8. ShortStopTime – the time the strategy will stop taking short trades
  9. LongExitTime – the time the strategy will exit long trades
  10. ShortExitTime - the time the strategy will exit short trades
  11. SessEndTime - the last bar of the session.  This is important as the day’s closing price is recorded at this time and is used the next day.
  12. StpLs – the stop loss for the strategy.  Set to $650 by default but is 21/32 points in Bonds so the stop loss will really be 656.25 since each tick is $31.25

Note: All time inputs should be set to your timezone.  The defaults shown above are for EST.  If you are in a different timezone, be sure to add/subtract based on your timezone.

Note: This session also uses a Custom Session from 9-5.  It will also work with the Tradestation Custom Session US Stock with Pre-market.