I have used Strategy Wizard to script Stochastics %K crossing above or below %D as a learning step take a manual
strategy of charting 3 time periods, 3 SMA, Parabolic SAR, MACD, and Stochastics and add some aids to this strategy. I would like receive an alert or e-mail when a crossover occurs.
Is it possible to script Stochastics Crossover as an indicator so that alerts or e-mails can been sent? In this case, it
appears I would want to make use of the "Stochastics Indicator" and call the results into another indicator and not a
strategy. Is this the correct way to handle it? Can some give me an idea on where to start?
Thanks,
Larry
///
/// Called on each bar update event (incoming tick)
///
protected override void OnBarUpdate()
{
// Condition set 1
if (CrossAbove(Stochastics(D, K, Smooth).K, Stochastics(D, K, Smooth).D, 1))
{
DrawArrowUp("My up arrow" + CurrentBar, false, 0, 0, Color.Lime);
PlaySound(@"C:\Program Files (x86)\NinjaTrader 6.5\sounds\long.wav");
}
// Condition set 2
if (CrossBelow(Stochastics(D, K, Smooth).K, Stochastics(D, K, Smooth).D, 1))
{
DrawArrowDown("My down arrow" + CurrentBar, false, 0, 0, Color.Red);
PlaySound(@"C:\Program Files (x86)\NinjaTrader 6.5\sounds\short.wav");
}
}