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

Activate/Desactivate a strategy

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

    Activate/Desactivate a strategy

    Hello,

    Is possible to activate/desactivate a strategy from code? For example, when I start my Ninjatrader I would like that my strategies to be activated automaticly.

    Thanks and regards.

    #2
    Hello soyjesus,

    Thanks for your question.

    It is not possible to automatically enable strategies or schedule strategies for enablement.

    It would be technically possible through external tools. We could not provide any direction in this process, but this has been discussed by other members on the forums. I'll provide a link to a thread below.



    As for disabling, a strategy can disable itself with CloseStrategy(). If you wanted to have another NinjaScript disable the strategy, you will have to create an AddOn that will provide framework to have the strategies communicate with other NinjaScripts. An example that touches on this concept is also linked below.

    CloseStrategy() - https://ninjatrader.com/support/help...sestrategy.htm

    MySharedMethodsExample - https://ninjatrader.com/support/foru...104#post457104

    If there is anything else I can do to assist, please let me know.
    Last edited by NinjaTrader_Jim; 07-01-2020, 12:43 PM.
    JimNinjaTrader Customer Service

    Comment


      #3
      looking for a solution to start a strategy in NinjaScript, the same way or process that happens when you check the box in the Strategies tab in the NinjaTrader Control Center. I tried to follow your link NinjaTrader_Jim and seems to be broken. thanks guys!
      lawyse
      NinjaTrader Ecosystem Vendor - Affordable Indicators

      Comment


        #4
        Thanks for the notice lawyse,

        I have corrected the link.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by funk10101, Today, 09:43 PM
        0 responses
        4 views
        0 likes
        Last Post funk10101  
        Started by pkefal, 04-11-2024, 07:39 AM
        11 responses
        36 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Yesterday, 08:51 AM
        8 responses
        44 views
        0 likes
        Last Post bill2023  
        Started by yertle, Today, 08:38 AM
        6 responses
        26 views
        0 likes
        Last Post ryjoga
        by ryjoga
         
        Started by algospoke, Yesterday, 06:40 PM
        2 responses
        24 views
        0 likes
        Last Post algospoke  
        Working...
        X