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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    65 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    139 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X