• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

My indicator has a Color property and I need to be able to persist and recover it

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

    My indicator has a Color property and I need to be able to persist and recover it

    I have created a few custom indicators for NT6. Because of the way NT6 requires multiple plots for multiple colors per line when plotting, some of these indicators have 6 or more plots. Certain pairs of these plots share settings and so I made parameters to accept the settings for these including color. When I set up my charts the way I want them, I saved a template. When I close and re-open a chart and apply the template, the color settings are missing and set to "unknown" (or something to that effect).

    Can you look into this? Is it a bug or can NT6 templates not handle saving inputs of class type 'Color'?

    Thank you!

    #2
    imported post

    For clarification, you have a property that is a color and this property is not recovering? If yes, then take a look at the VolumeProfile indicator source code.

    You will need to handle your color properties like this:
    ///<summary>
    ///</summary>
    [XmlIgnore()]
    [Description(
    "Color of volume bars representing sell trades.")]
    [Category("Colors")]
    [Gui.Design.DisplayNameAttribute(
    "Sell color")]
    public Color VolumeColorDown
    {
    get { return volumeColorDown; }
    set { volumeColorDown = value; }
    }

    ///<summary>
    ///</summary>
    [Browsable(
    false)]
    publicstring VolumeColorDownSerialize
    {
    get { return NinjaTrader.Gui.Design.SerializableColor.ToString( volumeColorDown); }
    set { volumeColorDown = NinjaTrader.Gui.Design.SerializableColor.FromStrin g(value); }
    }


    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      Thank you Ray ... this resolved my issues.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by futurestrader7, Today, 11:31 AM
      0 responses
      3 views
      0 likes
      Last Post futurestrader7  
      Started by Teebone21, Today, 10:38 AM
      0 responses
      6 views
      0 likes
      Last Post Teebone21  
      Started by J_o_s, 03-30-2020, 12:29 AM
      2 responses
      16 views
      0 likes
      Last Post J_o_s
      by J_o_s
       
      Started by ptpatrader, Today, 10:27 AM
      0 responses
      5 views
      0 likes
      Last Post ptpatrader  
      Started by albertokeira, Today, 09:30 AM
      0 responses
      8 views
      0 likes
      Last Post albertokeira  
      Working...
      X