Profitable or Unprofitable

Discussion in 'Automated Trading' started by nourozi, Jul 2, 2013.

  1. nourozi


    Hi guys,

    I have created my first automated strategy and I am wondering what I should expect from it going live, judging from the results in market replay testing with NinjaTrader.

    It uses limit orders on the ES. The thing is, it is profitable when I use liberal fills (filled when limit orders touched). It loses just as much when using conservative fills (filled when price penetrates the limit price).

    Let's say it loses 5K on average per week when using conservative fills, and it profits 5K when using liberal fills. The point is it seems to have a total inverse result when using these different fill settings.

    The problem is with conservative fills, it touches the limit order and then reverses, leaving me unfilled and causes me to miss a trade.

    The question is, what can I expect from it going live? Even if I am filled on half of the touched limit orders, I should break even.

    The limit orders are typically placed about 5 mins before it is touched. But ranges from 1min to 15min.

  2. gmst


    expect to lose. ES book size is too thick. in 80% of cases, you will have to cross bid-ask to get a fill. Touch will not give you a fill in 80% of cases.
  3. nourozi


    I don't understand what you man by a thick order book? Do you mean, there are a lot of limit orders at each price level? If so, does it really matter how thick the order book is? If I am ahead of 50% of orders at my limit price, doesn't that mean that I will get filled on average 50% of the time when touched?

    As far as I understand, in order for the bid/ask to trade through a price level, means that the buy/sell limit orders need to be exhausted/filled at that level. So it is only when all the limit orders at my limit price are filled that price will penetrate that level. If I am ahead of 50% of orders at the limit price, then I am likely to be filled before price penetrates, 50% of the time on average?

  4. dom993


    Ninja backtesting 101:

    1. Ignore MarketReplay for anything but verification of real-time behavior - Sim101 & MarketReplay fill engines are really bad (I can show you a LMT order filled intraday 10-tick better than the price limit assigned to the order, STP & MKT fills are fantasies as well)

    2. In "real" backtest (through Strategy Analyzer), use a 1-sec timeframe to get your orders managed by Ninja - never use your primary timeframe, and don't bother using a 1-tick timeframe for that order management, it won't work any better, just take more time & more RAM

    3. In "real" backtest (through Strategy Analyzer), OF COURSE use the "conservative" fills (I suppose you mean the Default fill type, really)

    4. In "real" backtest (through Strategy Analyzer), ALWAYS use 1-tick slippage, and be aware that the Default fill-type won't guarantee you it is at least 1-tick ... if you want that guarantee, use the attached fill-type (just place it in NinjaTrader7/bin/custom/type, and recompile any strategy after that, of course don't forget to select "BetterThanDefaultFillType" before running your backtest).

    5. Don't bother trying a strategy live if you don't get at least 5-ticks average net per trade using 1/2/3/4 above - you would be pretty much guaranteed to end-up losing money.
  5. nourozi


    Is this only for a strategy which uses Market Orders? I assume you wouldn't need to do this for a strategy that only uses limit orders.

  6. dom993


    Of course, slippage only applies to MKT & STP orders ... but if like most people you make any use of STP orders (either on entry or as protective exit), you have to consider their (likely) slippage.

    Bottom-line: don't fool yourself, set that slippage to 1-tick & forget about it.
  7. gmst


    Simple. ES average bid size is say 800 contracts. Let us say you place your orders in advance and you are at 500th position. Still 500 cars need to trade before your order will execute. Compare this with NQ - average bid size say is 50 cars, you place orders in advance and are at 30th position. Just 30 cars need to execute for you to get a fill.

    So, don't look only in % terms but also in terms of absolute numbers.
  8. gmst


    dom has offered practical wisdom gained from experience. When you are starting out trading, it is much better to work with conservative assumptions. Once you become more experienced in terms of order fill etc, you can modify the assumptions to make them a little bit more aggressive.