Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ninja 7 Strategy Property Question

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

    Ninja 7 Strategy Property Question

    In Ninja 7 Strategy how do I access the LABEL property from with inside the OnBarUpdate() or OnStartup() event of the strategy... I want to print the information contained in the "Label" out to my log on alerts and to the output window to assist in debugging and tracking performance.

    Thanks for the help.

    Mark

    #2
    Hello mjc4118,

    You may be able to do this with

    Print(this.ToString());

    This is the name of the strategy. Let us know if you're looking for something else.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      That works ...BUT ..it gives me all the parameters which is too much information. I really do not want to parse the string when I am sure what I am looking for already exists...

      it returns ... StrategyName(1,2,3,4,5,6,7,8,9) when all I really want is simply the StrategyName (Or the contents of the "Label" parameter and not all the extraneous data ...

      Comment


        #4
        I see. You should look into this reference sample on custom formatting the label property:
        Removing and Custom Formatting an Indicator’s Chart Label

        You should be able to format the value you're looking for by following that sample.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Thanks .. I can just use the Name Property.
          Additional question. where do you have documentation for all of the Properies and Methods for the NinjaTrader classes. I do not have any of this information in my help file. It would make questions like this unnescessary

          Thanks
          Mark

          Comment


            #6
            Beyond the help guide, we use these forums for documenting NinjaScript with the reference samples and tips section. This particular one (label) is only documented in the reference sample, because it involves a special technique for modifying.

            You can find an online version of our help guide here:


            Available classes, methods, properties are all defined here. Let us know if you're interested in anything specific and we can point to the right place.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            558 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            324 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            545 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            547 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X