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

Indicator Label and Name clarification

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

    Indicator Label and Name clarification

    Hello, I want to clarify a few items regarding the Name field as set in the OnStateChange() State.SetDefaults section.

    I made a copy of VOL (standard ninja indicator) to test this.

    I called this copy VOLTest1604 so the header of indicator looks like :

    public class VOLTest1604 : Indicator
    {
    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {

    Name = "VOLNameInside";
    }
    }
    etc...

    I put some code in the OnBarUpdate()

    which iterates over the indicator collection on the chart and prints out the

    Name & DisplayName of each indicator it finds.

    Prior to changing the Label parameter in the indicator parameters BOTH the
    Name and DisplayName show as VOLNameInside

    If i delete the Label so there is nothing there :

    the Name shows as null (empty) and the DisplayName reverts to VOLTest1604 ie the name of the file & header of indicator.

    Is this expected behaviour ? I would have expected the DisplayName to be null and perhaps the Name to remain as it is VOLNameInside or as VOLTest1604 ?

    Please advise.

    thanks

    #2
    Hello soulfx,
    Thanks for your post.

    This would be expected behavior. What are you trying to achieve?
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      I just wanted to check as i would have expected the Label parameter to refer to the DisplayName when iterating through the indicator list in the code. Instead it sets the Name to null and then defaults the DisplayName to the actual header/public class XXX : indicator name? Do you see what i mean?

      If this is how it is set up (which is not intuitive to me) then i just need to handle it in the code in that manner if i am checking on the indicator name.

      thanks

      Comment


        #4
        JoshG, ask Brett if it is in the works to change the naming behavior to the way it worked in NT7, per our fairly recent discussion.
        eDanny
        NinjaTrader Ecosystem Vendor - Integrity Traders

        Comment


          #5
          Hello eDanny,

          I forwarded your message to Brett. However, he has no comment at this time.
          Josh G.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by xiinteractive, 04-09-2024, 08:08 AM
          3 responses
          11 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by Johnny Santiago, 10-11-2019, 09:21 AM
          95 responses
          6,193 views
          0 likes
          Last Post xiinteractive  
          Started by Irukandji, Today, 09:34 AM
          1 response
          3 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Started by RubenCazorla, Today, 09:07 AM
          1 response
          6 views
          0 likes
          Last Post RubenCazorla  
          Started by TraderBCL, Today, 04:38 AM
          3 responses
          26 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X