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 NullPointStrategies, Today, 05:17 AM
          0 responses
          23 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          120 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          63 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          41 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          45 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X