PDA

View Full Version : Walking forward a strat


Dobbes
04-03-2009, 08:21 AM
Hello,

I've started forward testing a strategy and something peculiar is happening. It is entering on my exits and exiting on my entrances. For Entry names, it will say something like buy to cover, exit: sell short. I think part of the problem may be the virtual fill it uses when the strategy is first started. Any idea how I can fix this?

NinjaTrader_Bertrand
04-03-2009, 08:56 AM
Hi, are you walk forward testing it with the Strategy Analyzer or testing it on live on real time data? For the later it will be a synching issue between your account position and the strategy position, please see this link for more details - http://www.ninjatrader-support.com/HelpGuideV6/StrategyPositionVsAccountPosition.html

Dobbes
04-03-2009, 09:05 AM
I am testing it on live data.

So let me see if I got this right from your link. When the strategy starts running, it is running on historical data and needs to be synced to the live data. I can accomplish this by simply opening and closing an order.

Correct?

NinjaTrader_Bertrand
04-03-2009, 09:07 AM
Yes, correct you want to manually sync your account position to the strategy position.

Dobbes
04-03-2009, 09:24 AM
So I have to manually enter where the strategy would to sync it? Or can I just enter and exit so it knows to use the live data?

NinjaTrader_Josh
04-03-2009, 09:27 AM
Not sure what you mean by enter/exit to use live data, but you will want to manually sync up your account position to your strategy position as you start up.

Dobbes
04-03-2009, 09:39 AM
So the process is start the strategy, wait for the entry signal and then manually enter the trade and it should automate all the executions in the account from there?

NinjaTrader_Josh
04-03-2009, 09:51 AM
Dobbes,

No, as you start the strategy it will already have a strategy position determined. It will either think you are long, short, or flat. Depending on what your account position is you will need to sync your account position to this strategy position immediately. If strategy says long and account is flat, buy manually on account to match the long. etc.

Alternatively, if you are for sure using account position as flat you can go to Tools->Options->Strategies->NinjaScript and select "Wait until flat". With this option the strategy will start up with its strategy position, but will do everything virtually until it reaches a flat state which will in turn mean you are in sync with your account position. Then once the sync occurs it will place all further trades to your account.

Dobbes
04-03-2009, 09:57 AM
Ok Josh, I think that I finally get it. Thank you once again.

Dobbes
04-03-2009, 01:27 PM
Why are the strategy performance results and the account results so different?

NinjaTrader_Josh
04-03-2009, 01:42 PM
Account performance are your real live trades. Very likely your account doesn't have even close to as many trades as your strategy's virtual trades.