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:	588
Size:	8.8 KB
ID:	1247694
    Click image for larger version

Name:	StrategiesEnable,Disable.png
Views:	603
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 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
          49 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X