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

Weird??

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

    Weird??

    Hey, have a look at the attachment, and see if you can explain the red circled text in the indicator name? It is in relation to the first indicator which displays it's name as per the code, but it adds all that other text on for some reason? I can't see any reason for it in the code? I would like to know why it is appearing there and how to get rid of it.
    This is an indicator I have just coded, partly copied pasted, and modified, from one of my other indicators. Don't know that that should cause any thing like this though?
    Cheers,
    Ken.
    Attached Files

    #2
    Originally posted by KennyK View Post
    Hey, have a look at the attachment, and see if you can explain the red circled text in the indicator name? It is in relation to the first indicator which displays it's name as per the code, but it adds all that other text on for some reason? I can't see any reason for it in the code? I would like to know why it is appearing there and how to get rid of it.
    This is an indicator I have just coded, partly copied pasted, and modified, from one of my other indicators. Don't know that that should cause any thing like this though?
    Cheers,
    Ken.
    Those look like color properties. You must have coded them and decorated them with the [NInjaScriptProperty] attribute. If you do not want to see them, then remove that attribute from the property declaration.
    Last edited by koganam; 09-10-2017, 10:56 AM. Reason: Corrected programming syntax.

    Comment


      #3
      Sorry should have posted this in the NT8 section.

      Originally posted by koganam View Post
      Those look like color properties. You must have coded them and decorated them with the [NInjaScriptProperty] attribute. If you do not want to see them, then remove that attribute from the property description.
      Ok thanks, what exactly would I remove from this?

      [NinjaScriptProperty]
      [XmlIgnore]
      [Display(Name="BearBarDown", Order=2, GroupName="Parameters")]
      public Brush BearBarDown
      { get; set; }

      [Browsable(false)]
      public string BearBarDownSerializable
      {
      get { return Serialize.BrushToString(BearBarDown); }
      set { BearBarDown = Serialize.StringToBrush(value); }
      }

      And from this one which is a bit different in a different indicator.

      [XmlIgnore()]
      [NinjaScriptProperty]
      [Display(ResourceType = typeof(Custom.Resource), GroupName = "Colors", Order = 1)]
      public Brush TransitionDown
      {
      get { return transitionDown; }
      set { transitionDown = value; }
      }

      Both of these examples are causing the same issue.
      Cheers,
      Ken.

      BTW: Sorry should have posted this in the NT8 section.
      Last edited by KennyK; 09-07-2017, 11:56 PM. Reason: Posted in the wrong thread

      Comment


        #4
        Hello KennyK,

        Thanks for your posts.

        As member Koganam advised the solution here would be to remove the [NinjaScriptProperty] from each of the color properties.

        Please see the helpguide here on the use of the [NinjaScriptProperty]: http://ninjatrader.com/support/helpG...yattribute.htm
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thanks Legend!

          Thanks Paul & Kognam, you have been very helpful!
          Last edited by KennyK; 09-09-2017, 09:45 PM. Reason: something to add

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CortexZenUSA, Today, 12:53 AM
          0 responses
          1 view
          0 likes
          Last Post CortexZenUSA  
          Started by CortexZenUSA, Today, 12:46 AM
          0 responses
          1 view
          0 likes
          Last Post CortexZenUSA  
          Started by usazencortex, Today, 12:43 AM
          0 responses
          5 views
          0 likes
          Last Post usazencortex  
          Started by sidlercom80, 10-28-2023, 08:49 AM
          168 responses
          2,265 views
          0 likes
          Last Post sidlercom80  
          Started by Barry Milan, Yesterday, 10:35 PM
          3 responses
          12 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Working...
          X