View Full Version : Strategy fails to run automatically
Operandi
09-05-2008, 11:30 AM
Hi
I am trying to run a strategy from a chart, however it fails to run automatically - I have to keep pressing F5 to restart it so that it displays the buy and sell text on the chart.
The strategy also fails to communicate orders with IB TWS even though I have set the correct IB account in the Strategies property window.
Is there something simple that I'm doing wrong?
Thanks
Chris
NinjaTrader_Ben
09-05-2008, 11:51 AM
Hello,
It sounds like there is a bug your strategy that is making it hang or somehthing. You may find this link helpful for debugging:
http://www.ninjatrader-support.com/vb/showthread.php?t=3418
This link will also help to trace your orders:
http://www.ninjatrader-support.com/vb/showthread.php?t=3627
And be sure you have set up IB correctly with these steps:
http://www.ninjatrader.com/webnew/support_interactivebrokers.htm
mrlogik
09-06-2008, 07:33 AM
Additionally, you may find the LOG tab helpful to indicate any errors within your code. Take a look.
Operandi
09-06-2008, 10:21 AM
Hi
Thanks for the replies so far.
I installed the older version of TWS, and rectified a problem with end of session (http://www.ninjatrader-support.com/vb/showthread.php?t=9886&highlight=end+of+session) processing, which I found from the log, but still encountered the same issue.
The code seems fine, but I'll create a new strategy from scratch and re enter the code just to make sure. I'll then do more testing, to see if the problem persists.
One thought that I've had is that the laptop running the NT strat and TWS has only 1GB of RAM. It isn't running any other program, so may there be low memory problems causing the strategy not to run automatically?
mrlogik
09-06-2008, 10:50 AM
I would add prints to your code for debugging purposes and have the output window open. There's a disconnect somewhere...
Your laptop memory should be fine for running this. I have 3 laptops running where one only has 1 GB of RAM and runs fine.
Operandi
09-08-2008, 11:39 AM
I've resolved the problem. I hadn't enabled automated trading by File -> AT Interface in the Control Center.
Thanks, everyone, for your help
Chris