I have indicator which draw Rays on swing Highs.
When High[0] is higher than the Ray I want to change color from green to red. In NT7 this indicator works perfectly, but in NT8 doesn't work even if I changed the code.
Can you write me, where is problem?
thank you
Here is my code in NT8:
protected override void OnBarUpdate()
{
if (CurrentBar < BarsRequiredToPlot) return;
bool SwingHigh = false;
SwingHigh = High[4] < High[2] && High[3] <= High[2] && High[1] <= High[2] && High[0] < High[2];
if (SwingHigh)
Draw.Ray(this, "RayHigh" +CurrentBar, false, 2, High[2], 0, High[2], Brushes.LightGreen, DashStyleHelper.Solid, 2);
foreach (DrawingTool draw in DrawObjects)
{
if (draw is DrawingTools.Ray && draw.Tag.StartsWith("RayHigh"))
{
DrawingTools.Ray tempRay = draw as DrawingTools.Ray;
if (High[0] > tempRay.StartAnchor.Price)
tempRay.Stroke.Brush = Brushes.Red;
}
}
}

Comment