I just tested this sample script:
protected override void Initialize()
{
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (Close[0] < Open[0])
{
EnterLongLimit(GetCurrentBid());
}
// Condition set 2
if (Close[0] > Open[0])
{
EnterShortLimit(GetCurrentAsk());
}
}
NinjaTrader places no limit orders. If I use EnterLong() or EnterShort instead this sample script works. I used a ZenFire connection and the Sim101 account to test it. Why are no limit orders placed?
There is no error in the log window and there are also buy and sell signals printed on the chart. Any ideas? Thank you!
Comment