Thread: Possible to get filled on current bar in Strategy Analyzer?

Results 1 to 5 of 5

  1. #1

    Default Possible to get filled on current bar in Strategy Analyzer?

    Hello NT,

    I have a strategy that is supposed to exit a trade immediately if the current bar's Open price meets a certain criteria. For some reason (when I backtest it in the Strategy Analyzer) the strategy exits the trade on the following bar and not on the current bar.

    For example, let assume my strategy is supposed to exit immediately if a bar's open price is 1927.25. And lets assume two bars have just passed, with the first bar opening at 1927.25 and the second bar opening at 1927.50. This would cause my strategy to fill at 1927.50 instead of 1927.25.

    Is this just the way the Strategy Analyzer works? Or is there a way to get the fill to happen at 1927.25?

    Thanks,
    P.S.
    I have CalculateonBarClose set to False and am also using the FirstTickOfBar property, but it still does not work.
  2. #2

    Default

    Thank you for writing in.

    Please note that during a backtest, strategies can ONLY be processed at the close of each bar.

    Please take a look at the help guide at this link for discrepancies between real-time and backtesting: https://ninjatrader.com/support/help...ime_vs_bac.htm
  3. #3

    Default

    That is terrible news

    I have many complex exit strategies that rely on monitoring 1 tick bid bars and sending an order once the open of a 1 tick bid bar meets a certain criteria. And this order needs to be executed immediately (not on the following bar).

    The code example you posted here won't solve this problem (because 1 tick bid bars don't have any bars inside them.) http://ninjatrader.com/support/forum...ead.php?t=6652

    Are there any plans to fix this in NT7 and/or NT8?
  4. #4

    Default

    Thank you for your response.

    You can look to High Fill Resolution and Tick Replay in NinjaTrader 8. In NinjaTrader 7 I would recommend running the strategy in Market Replay with CalculateOnBarClose = FAlse.

    For information on NinjaTrader 8 please visit the following link: http://ninjatrader.com/support/helpG...en-us/beta.htm

    Please let me know if you have any questions.
  5. #5

    Default

    How can I request NT8 (as well as NT7) add a feature that will allow backtests/optimizations in the Strategy Analyzer to have immediate fills on the open of a 1 tick bid bar (or the open of any primary or non-primary bar) if the open meets certain criteria?

    There is a whole world of strategies am unable to backtest/optimize because of the lack of this feature.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts