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

FirstTickOfBar problem

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

    FirstTickOfBar problem

    Hello,
    I’m programming a strategy based on data series 2 ticks range. My entry is on the first tick of the bar but sometime the Open[0] value is that of the previous bar.
    For example (see screenshot attachment) the Open[0] should to be 145.59375 (145’19) instead 145.65625 (145’21).
    Does someone has already encountered this problem and can tell me how to solve it?
    Thank you,
    Michel
    Attached Files

    #2
    Hello elechim,

    I recommend you show these values in a Print function when actually running the strategy.

    It could be that there is a difference with session templates, days to load, or another setting.

    For example:
    Print(Time[0].ToString() + " - " + Open[0].ToString());

    This will print the open price to the output window.

    You will then be able to ensure the values for the bars are what is reflected on the chart.


    Please let me know if I can be of further assistance.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by haas88, 03-21-2024, 02:22 AM
    18 responses
    208 views
    0 likes
    Last Post haas88
    by haas88
     
    Started by Board game geek, Today, 02:20 AM
    0 responses
    1 view
    0 likes
    Last Post Board game geek  
    Started by knighty6508, Today, 01:20 AM
    2 responses
    14 views
    0 likes
    Last Post knighty6508  
    Started by franatas, Today, 01:53 AM
    0 responses
    2 views
    0 likes
    Last Post franatas  
    Started by knighty6508, Today, 01:17 AM
    0 responses
    9 views
    0 likes
    Last Post knighty6508  
    Working...
    X