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

Historical and first bar of current session

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

    Historical and first bar of current session

    Hi,

    Code following " if (Historical) " is executed on the first tick of the first bar of the current live session. Is there a way to prevent this?

    Thanks

    #2
    To clarify.

    if (Historical)
    Print("Something");

    You are saying that on the 1st tick of real-time bar, this code executes? If yes, how do you know that it is real-time?
    RayNinjaTrader Customer Service

    Comment


      #3
      Yes. I open the chart before the session starts. The code is executed on the historical bars (which is what I want and would expect).

      Then when the session starts, the code executes on the first tick of the new bar. I print out the time, price, volume, etc., so I know it's the first bar of today's session.

      Comment


        #4
        Thanks again. This is confirmed and we will resolve this for NT7 at this time.
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by tkaboris, Today, 08:01 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by Lumbeezl, 01-11-2022, 06:50 PM
        31 responses
        817 views
        1 like
        Last Post NinjaTrader_Adrian  
        Started by xiinteractive, 04-09-2024, 08:08 AM
        5 responses
        15 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by swestendorf, Today, 11:14 AM
        2 responses
        6 views
        0 likes
        Last Post NinjaTrader_Kimberly  
        Started by Mupulen, Today, 11:26 AM
        0 responses
        7 views
        0 likes
        Last Post Mupulen
        by Mupulen
         
        Working...
        X