I want to pass a color array into an indicator. Can't seem to get the serialize syntax correct. Tried a couple of variations but no luck.
private Color[] distanceRatiosColors = new Color[] {
Color.Indigo,
Color.Cyan,
Color.Magenta,
Color.DarkOrange,
Color.Navy,
};
[XmlIgnore]
[Description("Color Distance Ratios")]
[Category("Parameters")]
[Gui.Design.DisplayName("Color Distance Ratios")]
public Color[] DistanceRatiosColors
{
get { return distanceRatiosColors; }
set { distanceRatiosColors = value; }
}
// Serialize our Color object
[Browsable(false)]
public string[] DistanceRatiosColorsSerialize
{
get { return NinjaTrader.Gui.Design.SerializableColor.ToString( distanceRatiosColors); }
set { distanceRatiosColors = NinjaTrader.Gui.Design.SerializableColor.FromStrin g(value); }
}
Any clues on what the serialize section should be? I understand what the compiler is telling me just not sure how to code it.
Comment