Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with backtest

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problem with backtest

    Hello,

    I have problem with backtesting.

    See situation on the attachment - one is from Multicharts, second from NinjaTrader.

    Ninja trader fill one stoploss and one trade moreover than Multicharts.
    By my opinion wrong.
    On the blue diamond is stop order, on the red diamond is stoploss.

    When is candle on the top, Ninja buy, but candle certainly not return to the bottom!

    I use same data in Multicharts and NinjaTrader.
    Resolution of data is one minute and one candle have 15 minute.

    I test it with "CalculateOnBarClose = false" too, withou changes...

    Petr
    Attached Files

    #2
    Hello Petr,

    When your strategy is processing Historically or while Backtesting NinjaTrader is always going to process your Strategy with CalculateOnBarClose (COBC) true, only as real-time comes into NinjaTrader will your strategy process on every tick of data with COBC set to false.

    This is why you may see your Stop Loss order get his since after you are in position NinjaTrader only has access to the Open, High, Low, Close values so if the Low is low enough to hit your stop loss NinjaTrader will fill that order.

    If you would like to have some intrabar granularity to your strategy when backtesting you may view the following example that can show you how to add this logic into your strategy.
    You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by
    JCNinjaTrader Customer Service

    Comment


      #3
      Hello, super, it work. But this unnecessary difficult. Thanks Petr

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      11 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      10 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Yesterday, 07:51 PM
      0 responses
      11 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,980 views
      3 likes
      Last Post jhudas88  
      Started by rbeckmann05, Yesterday, 06:48 PM
      0 responses
      9 views
      0 likes
      Last Post rbeckmann05  
      Working...
      X