Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Label parameter

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

    Label parameter

    Hi, is there a way to set the "Label" parameter (in the "Visual" section) from within ninjascript?

    #2
    Hello pman777,
    Yes, you can override the ToString() method to do it.

    Please refer to this sample code which further demonstrates it
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Originally posted by pman777 View Post
      Hi, is there a way to set the "Label" parameter (in the "Visual" section) from within ninjascript?
      Code:
       
      this.Name = "WhateverYouWantItToBe";
      in the Initialize() method.

      Comment


        #4
        thanks ... i put that in my code but it is still printing out all of the variables on the chart ... I just want it to print the indicator name

        Comment


          #5
          Hello pman777,
          Have you tried overriding the ToString() method as demonstrated in this sample code.


          Can you please tell me what code you have used.
          JoydeepNinjaTrader Customer Service

          Comment


            #6
            sorry Joydeep, my reply was in response to the recommendation from koganam

            Comment


              #7
              Originally posted by pman777 View Post
              thanks ... i put that in my code but it is still printing out all of the variables on the chart ... I just want it to print the indicator name
              That is not what I understood by the statement: "... set the "Label" parameter ".If you want to shorten the string being printed, then you will have to override the ToString() method, as shown by Joydeep.
              Last edited by koganam; 01-28-2013, 03:59 PM.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by fwendolynlpxz, Today, 05:19 AM
              0 responses
              3 views
              0 likes
              Last Post fwendolynlpxz  
              Started by traderqz, Yesterday, 12:06 AM
              11 responses
              28 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by PaulMohn, Today, 03:49 AM
              0 responses
              8 views
              0 likes
              Last Post PaulMohn  
              Started by inanazsocial, Today, 01:15 AM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_Jason  
              Started by rocketman7, Today, 02:12 AM
              0 responses
              13 views
              0 likes
              Last Post rocketman7  
              Working...
              X