i wanted to make a BarColor change when the Momentum goes down,
it works but only if i have one condition, the second i add another conditions for example a Low [0] <= Low [1]
the bar colors dont get changed:
protected override void OnBarUpdate()
{
Value.Set(CurrentBar == 0 ? 0 : Input[0] - Input[Math.Min(CurrentBar, Period)]);
if (Value[0] >= 0
&& Low [0] <= Low [1]
&& Value[1] >= Value[0]
)
{
BarColor = Color.Red;
}
What i am making wrong here, or is it only possible in strategies to have a && command in the if section?
Comment