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 NullPointStrategies, Today, 05:17 AM
      0 responses
      19 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      119 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      63 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      45 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X