Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    Gaby V.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by llanqui, 04-28-2024, 10:32 AM
    7 responses
    35 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by geotrades1, Today, 08:33 AM
    6 responses
    19 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by dcriador, Today, 10:45 AM
    0 responses
    1 view
    0 likes
    Last Post dcriador  
    Started by llanqui, 04-28-2024, 03:53 AM
    2 responses
    27 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by RaddiFX, Yesterday, 09:55 PM
    5 responses
    32 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X