I want a very simple system, just buy when the close is the low of last 7 bars (and close is above 200SMA)
Does anybody know what's wrong with this code?
protected override void Initialize()
{
Add(SMA(200));
CalculateOnBarClose = true;
}
protected override void OnBarUpdate()
{
// Condition set 1
if (Close[0] > SMA(200)[0]
&& Close[0] == LowestBar(DefaultInput, 7))
{
EnterLong(DefaultQuantity, "long");
}

Comment