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

Forcing time delays?

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

    Forcing time delays?

    Greetings,

    Is it possible to setup a time delay/pause? I'd like to "pause" NT for a short period of time within a strategy (maybe a few minutes). A command like "Sleep(X);" seems to cause an error.

    Thank you.

    #2
    Unfortunately this is not supported.

    Note: You NEVER should code something like Sleep() in NinjaScript, since this could throw off NT internal logic.

    Comment


      #3
      Thanks for the reply. If a command like Sleep is not permissable, how do people normally "delay" their strategies?

      I simply want to "wait" for some outside (of NT) process to complete, then "continue" on with the strategy as some data from the outside process will be required to be "read into" the strategy to continue.

      Comment


        #4
        Check out this sample which uses a timer: http://www.ninjatrader-support.com/v...ead.php?t=5965

        Comment


          #5
          Thank you for the link!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Javierw.ok, Today, 04:12 PM
          0 responses
          4 views
          0 likes
          Last Post Javierw.ok  
          Started by timmbbo, Today, 08:59 AM
          2 responses
          10 views
          0 likes
          Last Post bltdavid  
          Started by alifarahani, Today, 09:40 AM
          6 responses
          40 views
          0 likes
          Last Post alifarahani  
          Started by Waxavi, Today, 02:10 AM
          1 response
          18 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by Kaledus, Today, 01:29 PM
          5 responses
          15 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X