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 RookieTrader, Today, 09:37 AM
              3 responses
              14 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by kulwinder73, Today, 10:31 AM
              0 responses
              5 views
              0 likes
              Last Post kulwinder73  
              Started by terofs, Yesterday, 04:18 PM
              1 response
              23 views
              0 likes
              Last Post terofs
              by terofs
               
              Started by CommonWhale, Today, 09:55 AM
              1 response
              3 views
              0 likes
              Last Post NinjaTrader_Erick  
              Started by Gerik, Today, 09:40 AM
              2 responses
              7 views
              0 likes
              Last Post Gerik
              by Gerik
               
              Working...
              X