Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Programmatically get Strategy.IsEnabled state?

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

    Programmatically get Strategy.IsEnabled state?

    Hello guys,

    is it possible somehow to get programmatically Strategy.IsEnabled property without UI extraction FrameworkElements mess?

    I tried ((Strategy)Account.Strategies[0]).IsEnabled but this is not affected anyhow by clicking Enable/Disable in strategy Tab.

    Just for context: I'm doing that inside Add-on.

    Please advice
    Attached Files
    Last edited by login_dejavu; 04-14-2020, 07:24 AM.

    #2
    Hello login_dejavu,

    Thank you for the post.

    Currently there is no way to access that information besides unsupported/undocumented means. It is by design that strategy instances cannot be managed from external code, there are a few feature requests for different aspects of controlling strategies from external code, the most related to this post that I can see would be to allow enabling a strategy from external code: SFT-2844. Are you specifically trying to just read the value or also control the strategy? I will forward a vote or create a new request depending on the overall goal here.

    Please let me know if I may be of additional assistance.

    Comment


      #3
      Hi Jesse,

      I was more referring to get read-only state, I do not want to enable/disable it via code.
      Now you intrigued me, what did you mean by unsupported/undocumented methods? Now I want that, if it is not hacky UI tree scans

      Comment


        #4
        Hello login_dejavu,

        I was just referring to what you mentioned as unsupported and undocumented, you made it sound like you are already doing something to get the value:

        is it possible somehow to get programmatically Strategy.IsEnabled property without UI extraction FrameworkElements mess?
        I am unaware of a way to access the value in a correct way directly through NinjaScript and I don't see specifically reading the value in the feature request. I will see if we can append the existing request to include reading the property otherwise I will make a new request for that.

        I look forward to being of further assistance.

        Comment


          #5
          Ok, thanks! If you could add me as vote for that, please do.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          41 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          20 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          27 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          45 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          37 views
          0 likes
          Last Post CarlTrading  
          Working...
          X