PDA

View Full Version : Strategy is running on historical data but not on live bars on demo account


zooinek
03-30-2010, 01:57 PM
Hello,

I would like to ask you, what could be wrong with the source code of strategy when it is correctly working on historical data but it is not working on live bars..?

I thought that when I am running strategy on historical data it is the same like when I am running strategy on live bars on demo account but faster...

I attachement is the source code of the strategy I am not sure if it is any bug of NinjaTrader or it is any bug in my strategy source code - but as I told - it is correctly working on historical data so I guess there is no bug in my source code..

Thank you for your help

btw: the strategy is created for CL market but also on NQ market was not working.
The problem is that the strategy is not entering.. it looks like the code was not even called - there was not called method EnterLong but it should.
On historical data when should be called this method it really was called.

NinjaTrader_Austin
03-30-2010, 02:17 PM
zooinek, are there any errors in the logs (right-most tab of Control Center)? You can set TraceOrders = true in the Initialize() section for further information about why an order could've been rejected.

Unfortunately it looks like you will have to get down and dirty with debugging this strategy due to the complexities present (helper methods, code not in english, etc). I recommend using plenty of Print() statements to make sure everything is happening as it should.

Also, you may want to break down the strategy to a much simpler form that actually works as it should, and then layer on the rest of your strategy until you find where it breaks.