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 rtwave, 04-12-2024, 09:30 AM
          4 responses
          30 views
          0 likes
          Last Post rtwave
          by rtwave
           
          Started by yertle, Yesterday, 08:38 AM
          7 responses
          29 views
          0 likes
          Last Post yertle
          by yertle
           
          Started by bmartz, 03-12-2024, 06:12 AM
          2 responses
          22 views
          0 likes
          Last Post bmartz
          by bmartz
           
          Started by funk10101, Today, 12:02 AM
          0 responses
          6 views
          0 likes
          Last Post funk10101  
          Started by gravdigaz6, Yesterday, 11:40 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Working...
          X