I have just recently registered with ninjatrader, but I am having some trouble using it.
I have a trial license, so I am unsure if this is causing the problem, so I hope someone could shed some light into this.
I developed a sample strategy just as a proof of concept, but when I try to backtest it, nothing seems to happen. At least, from what I can see in the report, no trades seem to be opened and closed.
This is my OnBarUpdate, I just want to open and close for the sake of the test:
if (!entered) {
EnterLong(100,"test");
entered = true;
}
else {
ExitLong();
entered = false;
}
And my initialization is just this:
protected override void Initialize() {
CalculateOnBarClose = true;
TraceOrders = true;
Print("Strategy Initialized");
}
I have tried this with some S&P500 instruments, but the report always comes empty.
Am I missing something here? Do I need to connect to some data feed? I am connected to 'Simulated Data Feed'. Is this not working because of the trial? Should I connect to some broker for this to work? If yes, how should I do this? Is there any tutorial on a step by step process for initializing Ninjatrader, with all the needed steps prior to being able to backtest a strategy?
Thank you for your help.

Comment