From 051db20919ce23519dca218e9c4e303fbc31b331 Mon Sep 17 00:00:00 2001 From: moshferatu Date: Thu, 23 May 2024 14:25:42 -0700 Subject: [PATCH] Add conditions regarding whether the TMA is above or below zero --- indicators/TrafficLight.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indicators/TrafficLight.cs b/indicators/TrafficLight.cs index 07dc10b..8a7eee9 100644 --- a/indicators/TrafficLight.cs +++ b/indicators/TrafficLight.cs @@ -72,12 +72,14 @@ namespace NinjaTrader.NinjaScript.Indicators macdHistogram2[0] > macdHistogram2[1] && macdHistogram3[0] > macdHistogram3[1] && rsiHistogram[0] > rsiHistogram[1] && + tmaSlope[0] > 0.0 && tmaSlope[0] > tmaSlope[1]) PlotBrushes[0][0] = PositiveBrush; else if (macdHistogram1[0] < macdHistogram1[1] && macdHistogram2[0] < macdHistogram2[1] && macdHistogram3[0] < macdHistogram3[1] && rsiHistogram[0] < rsiHistogram[1] && + tmaSlope[0] < 0.0 && tmaSlope[0] < tmaSlope[1]) PlotBrushes[0][0] = NegativeBrush; else