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 Brevo, Today, 01:45 AM
              0 responses
              6 views
              0 likes
              Last Post Brevo
              by Brevo
               
              Started by aussugardefender, Today, 01:07 AM
              0 responses
              3 views
              0 likes
              Last Post aussugardefender  
              Started by pvincent, 06-23-2022, 12:53 PM
              14 responses
              242 views
              0 likes
              Last Post Nyman
              by Nyman
               
              Started by TraderG23, 12-08-2023, 07:56 AM
              9 responses
              384 views
              1 like
              Last Post Gavini
              by Gavini
               
              Started by oviejo, Today, 12:28 AM
              0 responses
              6 views
              0 likes
              Last Post oviejo
              by oviejo
               
              Working...
              X