Thank you for your patience.
You could also look to simplify the conditions by checking the bar direction inside the conditions themselves. If nothing applies to the scenario then you could remove the object or set it to transparent.
In the code below you could replace the calls to Draw.HoriztonalLine() as Brushes.Transparent to RemoveDrawObject if you preferred.
if ((RSI1.Avg[0] >= 55) && (EMA1[0] > EMA2[0]) && (High[0] > ParabolicSAR1[0])) {[INDENT]if (High[0] > Open[0])[INDENT]Draw.HorizontalLine(this, "soTag002", Close[0] - 4 * TickSize, Brushes.LimeGreen, DashStyleHelper.Solid, 3);[/INDENT] else if (Low[0] < Open[0])[INDENT]Draw.HorizontalLine(this, "soTag002", Close[0] - 4 * TickSize, Brushes.Transparent, DashStyleHelper.Solid, 3);[/INDENT][/INDENT] } else if ((RSI1.Avg[0] <= 45) && (EMA1[0] < EMA2[0]) && (Low[0] < ParabolicSAR1[0])) {[INDENT]if (Low[0] < Open[0])[INDENT]Draw.HorizontalLine(this, "soTag002", Close[0] + 4 * TickSize, Brushes.DeepPink, DashStyleHelper.Solid, 3);[/INDENT] else if (High[0] > Open[0])[INDENT]Draw.HorizontalLine(this, "soTag002", Close[0] - 4 * TickSize, Brushes.Transparent, DashStyleHelper.Solid, 3);[/INDENT][/INDENT] } else[INDENT]Draw.HorizontalLine(this, "soTag002", Close[0] - 4 * TickSize, Brushes.Transparent, DashStyleHelper.Solid, 3);[/INDENT]
Comment