Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Colors disappear when restarting Ninja

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

    Colors disappear when restarting Ninja

    Hi,

    When I apply my custom indicator to a chart it all works fine. The input colors are setup correctly, as shown in attachment 1. But if I save the workspace, close Ninja, restart Ninja, and then reopen the workspace, the colors have all disappeared, as shown in attachment 2.

    The colors are defined as variables in the Variables section

    Code:
     
    #region Variables
    private System.Drawing.Color color1 = Color.White;
    private System.Drawing.Color color2 = Color.ForestGreen;
    private System.Drawing.Color color3 = Color.Lime;
    private System.Drawing.Color color4 = Color.LightSkyBlue;
    private System.Drawing.Color color5 = Color.Yellow;
    private System.Drawing.Color color6 = Color.DarkOrange;
    private System.Drawing.Color color7 = Color.Red;
    private System.Drawing.Color color8 = Color.White;
    and as inputs in the Properties section

    Code:
     
    #region Properties
     
    [Description("Color 1")]
    [GridCategory("Parameters")]
    public Color Color1
    {
    get { return color1; }
    set { color1 = value; }
    }
     
    [Description("Color 2")]
    [GridCategory("Parameters")]
    public Color Color2
    {
    get { return color2; }
    set { color2 = value; }
    }
     
    ...


    This is Ninja 7 beta 18. Is this a known bug or am I doing something wrong?

    Thanks
    Attached Files
    Last edited by bubblegum; 07-08-2010, 04:54 AM.

    #2
    bubblegum, you would need to serialize the color properties in your code properly, then those could be saved in the workspaces and thus persisted on restart -

    Comment


      #3
      Thank you very much for your quick reply. It worked.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      591 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      343 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      556 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      553 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X