I have the following strategy that is always in the market. It works fine with the Sim101 account, but with the FOREX.com live account it does not stay in sync.
Any ideas as to why this is the case? Ninjatrader should close the SHORT before going LONG and vice-versa.
protected override void OnBarUpdate()
{
if (BarsInProgress != 0)
return;
if (CurrentBars[0] < 1)
return;
// Set 1
if (Close[0] > MAX(High, length)[1])
{
EnterShort();
}
// Set 2
if (Close[0] < MIN(Low, length)[1])
{
EnterLong();
}
}
Comment