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

Chart lable

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

    Chart lable

    Hello Support and All,

    can someone please tell me why the strategy lable persists on the chart even though the Lable is removed from the General settings?

    Thanks

    #2
    Hello outsource,

    Thank you for your inquiry.

    In order to modify the strategy's label in your script, you would need to override the ToString() method.

    Here is an example below that will remove the label from the chart:
    Code:
    public override string ToString()
    {
         return "";
    }
    I would suggest taking a look at this reference sample on our support forum dealing with the modification of an indicator's/strategy's label: http://ninjatrader.com/support/forum...ead.php?t=4749

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ZacharyG View Post
      Hello outsource,

      Thank you for your inquiry.

      In order to modify the strategy's label in your script, you would need to override the ToString() method.

      Here is an example below that will remove the label from the chart:
      Code:
      public override string ToString()
      {
           return "";
      }
      I would suggest taking a look at this reference sample on our support forum dealing with the modification of an indicator's/strategy's label: http://ninjatrader.com/support/forum...ead.php?t=4749

      Please, let us know if we may be of further assistance.
      Hi Zachary,

      thank you for the suggestion.I forgot to add,that it wasn`t like that.The issue`s begun with the 3-rd party script i used for the strategy.I didn`t experiment with the ToString()method,just put the 3-rd party indicator into the framework.Additionally,the strategy names also became unvisible in the Strategies window.

      Thank you
      Last edited by outsource; 10-28-2015, 04:43 PM.

      Comment


        #4
        And this example doesn`t help:

        public override string ToString()
        {
        return "";
        }

        The lable is still there.

        Could that be that idiotic DLL 3-rd party BS the reason,that messes with the strategy label?

        I think you guys should restrict the vendors from selling their products as DLLs.In which God knows only what`s inside.

        Comment


          #5
          Hello outsource,

          The ToString() overeride would need to be in every script that your strategy utilizes in order to remove the label from those scripts.

          If the script does not override the ToString() method, then the label for that certain script will still display.
          Zachary G.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_ZacharyG View Post
            Hello outsource,

            The ToString() overeride would need to be in every script that your strategy utilizes in order to remove the label from those scripts.

            If the script does not override the ToString() method, then the label for that certain script will still display.

            Hello,Zachary,

            i think i`ve already told you that your example doesn`t work,meaning the method is there,but the label is there as well.

            Thank you

            Comment


              #7
              Hello outsource,

              Have you applied the ToString() override to all scripts that your strategy calls to appear on the chart?

              If your strategy is utilizing an assembly that does not have ToString() overridden, then the label for that particular assembly will still appear.
              Zachary G.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_ZacharyG View Post
                Hello outsource,

                Have you applied the ToString() override to all scripts that your strategy calls to appear on the chart?

                If your strategy is utilizing an assembly that does not have ToString() overridden, then the label for that particular assembly will still appear.
                Hi Zachary,

                How do i apply the method if the script in DLL?

                It maybe that the strategy calls the assembly which doesn`t have the method.

                So what`s next?Should i entierly remove this crap from the strategy?

                Thanks

                Comment


                  #9
                  Hi Zachary,

                  i removed the 3-rd party assembly and now the chart label issue`s gone.But another issue appears.The space in the strategies window is now empty.It`s not visible.What can be possibly wrong now?

                  Please check the image attached.

                  Thanks
                  Attached Files

                  Comment


                    #10
                    Nice find. Have you since restarted ?

                    Comment


                      #11
                      Originally posted by outsource View Post
                      Hi Zachary,

                      i removed the 3-rd party assembly and now the chart label issue`s gone.But another issue appears.The space in the strategies window is now empty.It`s not visible.What can be possibly wrong now?

                      Please check the image attached.

                      Thanks
                      What you are writing does not make much sense.

                      If you want to override the label of an indicator used inside a strategy, you use the standard c# OOP method of assigning a blank to the Name property of the indicator.

                      If you override the ToString() method of a NinjaScript class with a blank string, then NinjaTrader will show a blank string. What else were you expecting?

                      The computer does what you program it to do. You will begin to get much better results if you begin to accept that your code and nobody and nothing else is the issue. Start by accepting that if you get results that you do not expect, it is your fault for not coding it right. That way, instead of seeking to assign blame, as seems to be your wont, you will begin seeking to resolve your issue by determining what you have done wrong.

                      Your querulous tone is a large part of why largely, only NinjaTrader staff are responding to your posts, and other users are usually not. The NT staff have no choice but to respond, even in the face of your attitude, as it is their job to do so. A politer demeanor would bring you much quicker results, as other users on the board would be more willing to help you out.

                      Just my $0.02.
                      Last edited by koganam; 11-02-2015, 11:16 AM. Reason: Corrected spelling.

                      Comment


                        #12
                        Originally posted by sledge View Post
                        Nice find. Have you since restarted ?
                        Yes,restarted,but it`s still empty.Maybe it`s a NT7 V29 bug??

                        Comment


                          #13
                          Hello outsource,

                          Can you please provide the script, or a sample script, that demonstrates this issue?
                          Zachary G.NinjaTrader Customer Service

                          Comment


                            #14
                            Originally posted by NinjaTrader_ZacharyG View Post
                            Hello outsource,

                            Can you please provide the script, or a sample script, that demonstrates this issue?
                            No,i won`t provide the entire script as it`s very expensive.But what part of the script y`d need?

                            Comment


                              #15
                              Hello outsource,

                              I am unsure of what is causing your script to behave in that manner, so I would not know what part of the script is needed.

                              If you do not want to send your entire script, please send a sample script that can demonstrate this behavior.
                              Last edited by NinjaTrader_ZacharyG; 11-03-2015, 10:25 AM.
                              Zachary G.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by llanqui, Yesterday, 09:59 AM
                              2 responses
                              15 views
                              0 likes
                              Last Post llanqui
                              by llanqui
                               
                              Started by ThoriSten, Today, 03:56 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post ThoriSten  
                              Started by PhillT, 04-19-2024, 02:16 PM
                              3 responses
                              18 views
                              0 likes
                              Last Post mangel2000  
                              Started by TraderBCL, Today, 02:37 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post TraderBCL  
                              Started by mangel2000, Today, 02:23 AM
                              0 responses
                              9 views
                              0 likes
                              Last Post mangel2000  
                              Working...
                              X