Thank You!
// Add an ES 12-08 3 minute Bars object to the strategy
Add("ES 12-08", PeriodType.Minute, 1);
// Add an ES 12-08 3 minute Bars object to the strategy
Add("ES 12-08", PeriodType.Minute, 3);
CalculateOnBarClose = false;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Condition set 1
if (EMA(14)[0] > SMA(20)[0]
&& MACD(12, 26, 9)[0] > MACD(12, 26, 9).Avg[0])
{
PlaySound(@"C:\Program Files\NinjaTrader 6.5\sounds\beep.wav");
}
Comment