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 cmoran13, 04-16-2026, 01:02 PM
            0 responses
            42 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            25 views
            0 likes
            Last Post PaulMohn  
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            162 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            98 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            157 views
            2 likes
            Last Post CaptainJack  
            Working...
            X