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
    http://ninjatrader.com/support/forum...ead.php?t=4749
    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.
          http://ninjatrader.com/support/forum...ead.php?t=4749

          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 Jeremytang, 07-14-2018, 06:45 PM
              21 responses
              439 views
              0 likes
              Last Post mav8rick  
              Started by LeonK, Yesterday, 09:26 PM
              1 response
              7 views
              0 likes
              Last Post bltdavid  
              Started by NicholasJoannette, Yesterday, 03:01 PM
              2 responses
              11 views
              0 likes
              Last Post NicholasJoannette  
              Started by rach1994, Yesterday, 12:20 PM
              1 response
              35 views
              0 likes
              Last Post bltdavid  
              Started by litamm89, Yesterday, 11:00 AM
              5 responses
              21 views
              1 like
              Last Post rafael_delima86  
              Working...
              X