i programm a indicator where i want to set the color for it in the indicator propertys window. I can see the two color fields (propertys), but when i change the color, it does not take effect on the chart, even i reload the chart or remove and apply the indicator again.
Here's what i have:
Code of the region Variables:
#region Variables
// Wizard generated variables
// User defined variables (add any user defined variables below)
public Color pinbarUpColor = Color.Magenta;
#endregion
Code on Bar update:
if(Open[0] > (LastLow+(BarRange*LongOpen))
&& Close[0] > (LastLow+(BarRange*LongClose))
{
//Change the Bar color
BarColor = pinbarUpColor;
// Paints a up arrow on the current bar 1 tick below the low
DrawArrowUp("PinUp"+High[0], true, 0, Low[0] - TickSize, pinbarUpColor);
//Throw Alarm
Alert("LONG-PinBarAlert", NinjaTrader.Cbi.Priority.High, "New LONG Pinbar", "Alert1.wav", 10, Color.Black, pinbarUpColor);
}
Code for #region Properties:
[Description("Color for the Up PinBar")]
public Color PinbarUpColor
{
get { return pinbarUpColor; }
set { pinbarUpColor = value; }
}
I'm not a professional but i dont understand, why i can see the colors and even change them, but no effect on the chart happens.
thank you for helping me
esatino
Comment