The strategy worked long ago. But all my draw text and arrows not working suddenly so I try this simple one. My indicators can draw texts and arrows but just strategy doesn't.
I also review "Drawing objects" windows. Can't find tags. Ninjatrader output window does print the debug info, so the draw arrow or text code block was executed.
if (CrossAbove(MACD1.Default, MACD2.Avg, 1))
{
MACDCrossUp = true;
Draw.Text(this, @"plotMACDSto Text_1", @"MACD up", 0, (Low[0] + (-3 * TickSize)) );
Print(Convert.ToString(Times[0][0].TimeOfDay));
Print(@"CrossAbove MACD");
}
// Set 2
if (CrossAbove(Stochastics1.K, Stochastics1.D, 1))
{
StoCrossUp = true;
Draw.Text(this, @"plotMACDSto Text_2", @"sto Up", 0, (GetCurrentAsk(0) + ((Low[0] + (-5 * TickSize)) * TickSize)) );
Print(Convert.ToString(Times[0][0].TimeOfDay));
Print(@"CrossAbove Sto");
Draw.Text(this, @"plotMACDSto Text_2", @"sto Up", 0, (GetCurrentAsk(0) + ((Low[0] + (-5 * TickSize)) * TickSize)) );
}

Comment