Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Virtual Strategy

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

    Virtual Strategy

    Hello,

    The way to typically enable a strategy is to add it to chart and then check Enable checkbox. Is there a way to submit a virtual strategy, essentially launch and enable strategy via code and not manually adding it to the chart?

    Thanks

    #2
    Hello RedDuke,

    Thanks for the post.

    With the "Strategy" type there is not a way to do that, strategies are specifically intended for the user to apply them. That is to avoid any type of error situation which can place live trades.

    The best alternative to continue using a strategy and be able to enable/disable it like that would be to implement buttons within the strategy so you can turn on or off parts of the logic. https://ninjatrader.com/support/help...ightsub=userco ntrol

    An example would be having conditions in the strategies OnBarUpdate and the having the buttons toggle bool variables to turn on those conditions when needed.

    Another alternative would be the addon framework. That could accomplish what you are asking. The best candidate to replace a strategy would be an indicator. That works similar and from the chart visually and with the dataseries from the chart. You would only have to apply the indicator once and save it in the workspace, then any time the chart is open it could continue working.

    After finding an account you could submit orders to it and manage orders much like a strategy. The main difference is that you won't have specific strategy features like the managed approach or strategy performance.






    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse,
      I figured it was not possible but just wanted to check. The idea was to submit strategy virtually once trade closes kill it from memory.
      Thank you

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      52 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      70 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      48 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X