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.

    https://ninjatrader.com/support/help...ount_class.htm
    https://ninjatrader.com/support/help...nt8/submit.htm



    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 chumpsky33, Today, 03:21 AM
      0 responses
      3 views
      0 likes
      Last Post chumpsky33  
      Started by klaus w, Today, 02:09 AM
      0 responses
      8 views
      0 likes
      Last Post klaus w
      by klaus w
       
      Started by RaddiFX, Yesterday, 11:57 PM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by Tonofit, Today, 12:00 AM
      0 responses
      13 views
      0 likes
      Last Post Tonofit
      by Tonofit
       
      Started by ck6libra, Yesterday, 11:20 PM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X