Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              576 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              334 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
              553 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              551 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X