Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enable, Disable strategy from addon

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

    Enable, Disable strategy from addon

    Click image for larger version

Name:	EnableDisable Strategy.png
Views:	611
Size:	8.8 KB
ID:	1247694
    Click image for larger version

Name:	StrategiesEnable,Disable.png
Views:	628
Size:	6.2 KB
ID:	1247695

    I have an addon I built with with a better coder than I. I have 7 accounts I am trading with multiple futures contracts

    I would like to disable or enable the strategy on multiple charts manually or via script. I like to trade between 8:00 - 3:45 eastern. I want to disable most strategies. My strategy can read the addon values; but I want the one click OFF button one Click ON Button If Janet Yellen is about to speak I use the Control Center enable, Disable.

    I can set up the tools to only trade if my Signals are selected but If I could replicate the Strategy off Enable checkbox I have several use cases for this

    #2
    There are at least two cases - the first case is you click your button on the AddOn, and the strategies (because they are in communication with the AddOn) go flat and don't take any more trades until you "enable" them again, but they're still technically running. The second case is you disable them, and they're no longer running.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      QuantKey_Bruce, you are over the target. I already have the code to not take a trade. But I have real time DB logging and other code and I wish to disable vs not trade on a signal.

      Comment


        #4
        Use CloseStrategy(); https://ninjatrader.com/support/help...sestrategy.htm
        Bruce DeVault
        QuantKey Trading Vendor Services
        NinjaTrader Ecosystem Vendor - QuantKey

        Comment


          #5
          Hello BartMan,

          Thanks for your post.

          There are no methods or functions available to enable a strategy from code. Strategies are designed so that they must be manually enabled.

          To disable a strategy through code you could use the CloseStrategy() method as QuantKey_Bruce noted. The CloseStrategy() method cancels all working orders, closes any existing positions, and finally disables the strategy.

          CloseStrategy(): https://ninjatrader.com/support/help...sestrategy.htm
          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          88 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          135 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          68 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          119 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          69 views
          0 likes
          Last Post PaulMohn  
          Working...
          X