No announcement yet.

Partner 728x90


Late entries executions - how to solve this

  • Filter
  • Time
  • Show
Clear All
new posts

    Late entries executions - how to solve this

    Looks like entries are happening late. Look at the entry happening on green candle here where as I was expecting to be on previous candle to green candle.

    How can we make sure entry happens on right time?????

    Click image for larger version

Name:	Capture.PNG
Views:	38
Size:	18.7 KB
ID:	1153859

    I Click image for larger version

Name:	Capture.PNG
Views:	59
Size:	18.7 KB
ID:	1153858


    Thank you for your note.

    What is the Calculate setting for the strategy? If the strategy is set to OnBarClose as the Calculate mode, you will see orders submitted on the bar after the bar that triggers them, as the logic for each bar is not calculated until the end of the bar. When processing over historical data, such as data loaded prior to real-time data on a chart, or in a backtest using the Strategy Builder, this will also be the case.

    During a backtest you can select conservative or liberal fill algorithms which will produce different results. Fills are determined based on 4 data points, OHLC of a bar since that is the only information that is known during a backtest and there will be no intra-bar data. This means actions cannot happen intra-bar, fills cannot happen intra-bar. All prices and actions come from and occur when the bar closes as this is all the information that is known.

    Because of this, OnBarUpdate will only update 'On bar close' as it does not have the intra-bar information necessary for 'On price change' or 'On each tick'.

    Also, here is a link to the differences on real-time vs backtest (historical).

    When running on real time data, you can set the strategy to OnPriceChange or OnEachTick for the calculation mode in order for orders to be placed on the same bar they are triggered on.

    When backtesting on historical data or in a backtest using the Strategy Analyzer, adding intra-bar granularity can help with this.

    Intra-bar granularity adds a second data series such as a 1 tick series so that the strategy has finer granularity in the historical data in between the OHLC of the primary series. This allows for more accurate trades by supplying the correct price at the correct time for the order to fill with.

    In NinjaTrader 8, there have been two new enhancements so that programmers do not have to manually add this secondary series and code the script to for high accuracy fills (Order Fill Resolution) and for intra-bar actions (TickReplay).

    Here is a link to our forums that goes into depth on using Order Fill Resolution and Tick Replay to ensure your backtests are as close to real time results as possible:

    High Fill Order Resolution and TickReplay cannot be used together. If it is necessary to have both, it is still possible to add intra-bar granularity to a script in the code itself for order fill accuracy and use TickReplay to update indicators with Calculate set to OnPriceChange or OnEachTick historically.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service


    Latest Posts


    Topics Statistics Last Post
    Started by D Trader, Today, 04:02 PM
    0 responses
    Last Post D Trader  
    Started by aligator, Today, 02:09 PM
    2 responses
    Last Post Harry
    by Harry
    Started by NinjaTrader_Kate, Today, 02:40 PM
    0 responses
    Last Post NinjaTrader_Kate  
    Started by patpat, Today, 11:34 AM
    1 response
    Last Post NinjaTrader_ChrisL  
    Started by crystalet, Today, 10:41 AM
    3 responses
    Last Post crystalet