Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What is my malfunction

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

    What is my malfunction

    Fairly new to ninjatrader.

    I've tinkered well enough with the strategy builder, but im having an extremely simple issue.

    Basically, on a 5 min chart, when the CURRENT price equals or crosses the last bars HIGH, enter. It does so, but only on the NEXT bar. How do I have it enter on the current bar?

    Calculation is set to: Each Tick

    According to my research on the forum, "Close" is equivalent to the current price. Here is the condition I have:

    Default input[0] >= High[1]

    When looking at the historical trades on the chart, everything is entered on the bar AFTER Default input[0] >= High[1].
    Last edited by muhstonks; 09-20-2023, 05:24 PM.

    #2
    Hello muhstonks,

    Thank you for your post.

    Historical data only uses the OHLC of the data series that the order is submitted to simulate the order fill, and there is no actual intra bar movement with processing the order fill.

    Historical processing will follow Calculate.OnBarClose processing unless Tick Replay is used. (Note: Tick Replay allows for intrabar actions, but is not intended for intrabar order fills.)

    Adding intra-bar granularity can help get more accurate order fills.

    Please see this forum post which goes over discrepancies in real-time vs. backtest, and how to implement intra-bar granularity:

    https://forum.ninjatrader.com/forum/...ive#post773377

    Please let me know if I can assist further.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    78 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X