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

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.
    JesseNinjaTrader Customer Service

    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 wzgy0920, 04-20-2024, 06:09 PM
      2 responses
      26 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, 02-22-2024, 01:11 AM
      5 responses
      32 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, 04-23-2024, 09:53 PM
      2 responses
      49 views
      0 likes
      Last Post wzgy0920  
      Started by Kensonprib, 04-28-2021, 10:11 AM
      5 responses
      193 views
      0 likes
      Last Post Hasadafa  
      Started by GussJ, 03-04-2020, 03:11 PM
      11 responses
      3,235 views
      0 likes
      Last Post xiinteractive  
      Working...
      X