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

Bars.FirstBarOfSession

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

    Bars.FirstBarOfSession

    I am trying to attach a Live Strategy to a chart and want to take certain actions on:

    if (Bars.FirstBarOfSession && CurrentBar > 0)
    {

    }


    This condition never seems to be satisfied even when a new session bar is formed. I am using ES futures so would expect this to be satisfied 1 time each day around 5:15 CET or something.

    Please advice.

    #2
    Hello Newworldguy,

    Thank you for your post.

    Do you have anything inside of the statement?

    If you add in Print("First bar of session"); do you see prints coming to the Output window?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      of course i did that and no prints :=(

      Comment


        #4
        Newworldguy,

        How many days of data are you loading?

        What time interval are you running this script on?

        Can you attach your script that you are using?
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          I am running 1 minute for 3 days

          Comment


            #6
            Newworldguy,

            I would like you to try two items.

            First, ensure you are connected to your connection

            Second, can you just run a basic script with only the condition and have it print Hello when true
            if(Bars.FirstBarOfSession && CurrentBar > 0)
            Print("hello");
            Cal H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Skifree, Today, 03:41 AM
            3 responses
            12 views
            0 likes
            Last Post Skifree
            by Skifree
             
            Started by traderqz, Yesterday, 09:06 AM
            5 responses
            32 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by guillembm, Today, 11:25 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by owensd, 04-21-2024, 11:34 PM
            9 responses
            34 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by trilliantrader, 04-10-2024, 09:33 PM
            7 responses
            25 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Working...
            X