Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can someone please provide some guidance?

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

    Can someone please provide some guidance?

    I have some public bools, doubles and integers variables located in a private abstract class which I am trying to "expose", so that I can call up their values in the strategy I am trying to create.

    Could someone please point me in the right direction in "unlocking" the values so that they may be exposed and used by the strategy's code?

    Thanks in advance

    Kay Wai

    #2
    Hello,

    I would look into the general c# concept of properties. This should do the trick for you. I suggest that you simply google c# properties for more information how to use this to provide interfaces to interact with classes.

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Originally posted by kaywai View Post
      I have some public bools, doubles and integers variables located in a private abstract class which I am trying to "expose", so that I can call up their values in the strategy I am trying to create.

      Could someone please point me in the right direction in "unlocking" the values so that they may be exposed and used by the strategy's code?

      Thanks in advance

      Kay Wai
      If you have exposed the property in the class, and as I suspect, you have two classes with the same property name, then call the variable by the fully qualified name: Indicator.Class.Variable.

      Comment


        #4
        Thank you Brett and Koganam!

        Will flip thru C# properties Brett and try your suggestion Koganam!

        And will report back after I move house!

        Kay Wai

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        60 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        148 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        97 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        284 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X