Announcement

Collapse
No announcement yet.

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

        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 sjsj2732, 03-23-2026, 04:31 AM
          0 responses
          77 views
          0 likes
          Last Post sjsj2732  
          Started by NullPointStrategies, 03-13-2026, 05:17 AM
          0 responses
          313 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          314 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          149 views
          1 like
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          114 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Working...
          X