Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy remains yellow after 15 mins?

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

    Strategy remains yellow after 15 mins?

    What have I done wrong?

    Somtimes it starts instantly and turns green in seconds, sometimes remains yellow for 15 mins or for a half of an hour... how can I fix this?

    #2
    Hi greed999, it depends if there's a historical strategy position it waits to get flat from or not - here are all the states explained - http://www.ninjatrader.com/support/h...egies_tab2.htm
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Well, actually I don't use any historical data... It doesn't allow me to set 'days to load' parameter to 0... Does it mean that strategy has to load one day? 'min bars required' is set to 0 also... Can I avoid the delay?

      Comment


        #4
        If you do not want to deal with historical calcs on OnBarUpdate() calls you could simply call OnBarUpdate() only for realtime data going forward, here's how:

        BertrandNinjaTrader Customer Service

        Comment


          #5
          And thats all? In order to prevent script from hanging during startup I just need to add

          if (Historical) return;

          into OnBarUpdate() procedure before my main code?

          Comment


            #6
            Correct, you would then see no historical position or backtesting, just a strategy that will process logic after the first realtime bar is seen.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Bertrand, you are the best :-)

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by cre8able, 02-11-2023, 05:43 PM
              3 responses
              232 views
              0 likes
              Last Post rhubear
              by rhubear
               
              Started by frslvr, 04-11-2024, 07:26 AM
              8 responses
              111 views
              1 like
              Last Post NinjaTrader_BrandonH  
              Started by stafe, 04-15-2024, 08:34 PM
              10 responses
              44 views
              0 likes
              Last Post stafe
              by stafe
               
              Started by rocketman7, Today, 09:41 AM
              3 responses
              8 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by traderqz, Today, 09:44 AM
              2 responses
              6 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Working...
              X