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 Stanfillirenfro, Today, 07:23 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cmtjoancolmenero, Yesterday, 03:58 PM
        2 responses
        20 views
        0 likes
        Last Post cmtjoancolmenero  
        Started by olisav57, Yesterday, 07:39 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by cocoescala, 10-12-2018, 11:02 PM
        7 responses
        944 views
        0 likes
        Last Post Jquiroz1975  
        Started by oviejo, Today, 12:28 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X