Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Color defaults wont save
Collapse
X
-
Have you remembered to dispose of your textBrushes ?Originally posted by marty087 View Post
-
Thanks Sledge. Much appreciated.
Here is the code i added... Works a charm.
[Browsable(false)]
public string LevelNormalColorSerialize
{
get { return SerializableColor.ToString(this.LevelNormal); }
set { this.LevelNormal = SerializableColor.FromString(value); }
}
Leave a comment:
-
As koganam saidOriginally posted by sledge View PostI think this is where the serializable comes in...
"Any inputs that are not serializable, if changed from the defaults, will not be saved with the indicator, unless you make your own arrangements to serialize such."
search here
Leave a comment:
-
I think this is where the serializable comes in...
Originally posted by marty087 View PostHi,
I have coded an indicator that has definable colors for all lines and text drawn by indicator.
Everything works fine expect the default colors always revert back to the set color where defined in variables. Even after saving the defaults.... The original parameters can be saved but the colors wont stay.
I have trawled the internet looking for answers and found someone else with a simlar problem which was solved by removing the " XmlIgnore" however this just takes the colors away altogether in which case they need to be defined every time the indicator is run.
The funny thing is that i got the below code from another program that someone else coded and it works fine and holds the values in that program... but not in mine... :-(
Can anyone make any suggestions?
[Description("Text Colour for last Alert2"), XmlIgnore, VisualizationOnly]
[GridCategory("Status panel")]
[NinjaTrader.Gui.Design.DisplayName("Levels Color")]
public Color LevelNormal
{
get { return this.textbrushOff.Color; }
set { this.textbrushOff = new SolidBrush(value); }
}
Leave a comment:
-
Color defaults wont save
Hi,
I have coded an indicator that has definable colors for all lines and text drawn by indicator.
Everything works fine expect the default colors always revert back to the set color where defined in variables. Even after saving the defaults.... The original parameters can be saved but the colors wont stay.
I have trawled the internet looking for answers and found someone else with a simlar problem which was solved by removing the " XmlIgnore" however this just takes the colors away altogether in which case they need to be defined every time the indicator is run.
The funny thing is that i got the below code from another program that someone else coded and it works fine and holds the values in that program... but not in mine... :-(
Can anyone make any suggestions?
[Description("Text Colour for last Alert2"), XmlIgnore, VisualizationOnly]
[GridCategory("Status panel")]
[NinjaTrader.Gui.Design.DisplayName("Levels Color")]
public Color LevelNormal
{
get { return this.textbrushOff.Color; }
set { this.textbrushOff = new SolidBrush(value); }
}Tags: None
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
663 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
376 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
110 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
575 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
580 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Leave a comment: