namespace NinjaTrader.NinjaScript.Strategies
{
public class Breakout : Strategy
{
protected override void OnBarUpdate()
{
double min = MIN(Low, 7)[1];
double high = MAX(High, 7)[1];
double sma = SMA(200)[0];
double close = Close[0];
if (close < min && close > sma)
EnterLong();
else if (Close[1] > high)
EnterShort();
}
}
}

Comment