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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      167 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      88 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      128 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      208 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      185 views
      0 likes
      Last Post CarlTrading  
      Working...
      X