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 Hwop38, 05-04-2026, 07:02 PM
              0 responses
              174 views
              0 likes
              Last Post Hwop38
              by Hwop38
               
              Started by CaptainJack, 04-24-2026, 11:07 PM
              0 responses
              329 views
              0 likes
              Last Post CaptainJack  
              Started by Mindset, 04-21-2026, 06:46 AM
              0 responses
              252 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by M4ndoo, 04-20-2026, 05:21 PM
              0 responses
              356 views
              0 likes
              Last Post M4ndoo
              by M4ndoo
               
              Started by M4ndoo, 04-19-2026, 05:54 PM
              0 responses
              183 views
              0 likes
              Last Post M4ndoo
              by M4ndoo
               
              Working...
              X