Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Starting a Strategy

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

    Starting a Strategy

    If I want to manually turn on and off a strategy while watching the screen for certain market conditions, what is the lag time to start it once I check the enabled box? Right now I see it waits for a few bars to start. Is there a way it can do so immediately on the next bar or tick?

    #2
    Hello Trader17,

    Thank you for the post.

    This, in general, is going to depend on your script, but it will at the least take a short time to enable and process OnBarUpdate if you are enabling and disabling. I would likely suggest using a button for this to enable its logic but leave the script enabled.

    One simple example is the UserControlCollection: https://ninjatrader.com/support/help...ub=usercontrol

    You could add a button to the chart to toggle a boolean value to turn logic on and off.

    I look forward to being of further assistance.

    Comment


      #3
      Thanks. What I noticed is if a strategy calculates on the close of a bar and I enable it before the bar closes it will not take that setup but wait for the next one to come along. I thought it it would start looking on the next tick when started.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      21 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      30 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Working...
      X