http://www.ninjatrader.com/support/f...ghlight=period
The code below is a little modified from the thread but fits more of what I want.
protected override void OnBarUpdate()
{
// Condition set 1
int count = 0;
for(int i = period - 1; i >= 0; i--)
{
if(Close[i] >= Close[i+1])
{
count++;
}
}
if(count == period)
{
DrawArrowDown("My down arrow" + CurrentBar, false, 0, High[1] + 3 * TickSize, Color.Red);
Print("Entered Long");
EnterLong(1, "Long 1");
}
}

Comment