View Full Version : CPU usage during auto trading
Thomas
08-10-2007, 10:27 AM
I currently use TS for my auto trading, however, lately I have been having problems with charts freezing up during high tick volume periods in the er2 and es.
Does anyone have a feel as to whether C# needs less, more, or about the same as ela in the area of cpu and memory.
ie: If both we're doing the same computations would C# put less of a drain on the CPU and memory?
NinjaTrader_Dierk
08-10-2007, 12:20 PM
Unfortunately we are unable to compare the CPU usage of .NET (C#) and TS ELA. I would speculate that the just-in-time-compile approach of .NET is more efficient than the EL concept, but I really don't know.
However, this is pretty irrelevant, since the actual performance of your strategy/indicator is rather dependent on these factors:
- "overhead" of underlying system (NT/TS)
- actual strategy/indicator code
- amount of ticks/sec coming in the compared systems
- processing logic: per-tick or per-bar. NT: CalculateOnBarClose=true for once-per-bar calcs
- chart refresh interval (see NT: property "Display update interval")
- ...
Thomas
08-10-2007, 12:38 PM
"amount of ticks/sec coming in the compared systems"
Yes, this is the factor that has been the problem as of late. I love the volatility, but the tick volume and speed is overbearing my system.
BC5391
08-11-2007, 12:48 PM
"amount of ticks/sec coming in the compared systems"
Yes, this is the factor that has been the problem as of late. I love the volatility, but the tick volume and speed is overbearing my system.
I have a dual core processor and 2gig memory, If I keep the tick chart above 75 on a normal day there is no problem, but If I would try to plot a 20 tick chart then Ninja will freeze up.
NinjaTrader_Dierk
08-11-2007, 11:04 PM
I suggest ripping through this list and see what you could optimize/change:
- set CalculateOnBarClose=true on indicators/strategies
- inspect custom indicator/strategy code for potential optimization (if applicable)
- remove 3rd party vendor indicator/strategies (if applicable)
- use less indicators/strategies/charts
- change the chart refresh interval (see chart property "Display update interval")
- check on task manager if there is still enough RAM available as NT runs (to make sure system is not "swapping")
rokafella
08-12-2007, 12:09 AM
I thought I was the only one having issues with TS and NT. My TS/Ninja combo just kills my comp after a couple hours. I'm only feeding a 5min chart with no indicators or strats. Although I do have other workspaces open at the same time, feeding Ninja via TS realtime is just not feasible for me during live trading. I have a dual core amd with 3gb so it is certainly not a hardware issue. I certainly don't know where the bottleneck is but I wish you guys would fix this. It kills me to be able to run TS with Ninja. And where do I submit my suggestion for hotkeys?
Please give me hotkeys...please...pretty please, with a cherry on top :D
NinjaTrader_Dierk
08-12-2007, 12:16 AM
Let's not get confused. These are 3 different issues:
- original post was a general question on TS and NT comparison
- next issue was a general NT chart freeze (there was no notion of TS)
- your issue is a "TS feeds NT" issue
On your issue: the question is wether TS or NT causes most the CPU load. I suggest monitoring the task manager to see which application causes the most CPU load. Note: TS starts several programs/processes, you will need to monitor them all. Please compare the process list before and after starting TS so you'll see.
Please post suggestions here: http://www.ninjatrader-support.com/vb/forumdisplay.php?f=11
rokafella
08-12-2007, 12:37 AM
Appreciate the reply. Any suggestions for my NT via TS feed issue?
It doesn't matter what I run, that combo is just deadly for my comp.
All last week I had issues with my comp and TS. Darn thing kept freezing up on me which is very rare and then it hit me, I had restored some workspaces earlier in the week and what do you know, the nt feed strat had been running this whole time. I turned it off and all was back to normal. I love NT but I would love it even more if I could feed it with my TS.
NinjaTrader_Dierk
08-12-2007, 04:43 AM
Unfortunately there is little I could provide, apart from trying to isolate if NT or TS is the issue (please see below). You also might consider posting something on the TS forum ...
rokafella
08-12-2007, 06:17 PM
Well the only solution is to not feed NT with TS since my comp only crashes with this combo. So far I've only tried it on a XP box, I'll try it on a Vista box and let you know what I come up with.
NinjaTrader_Dierk
08-12-2007, 11:26 PM
Curious: Do you feed data from TS to NT or only orders which are placed through ATI?
rokafella
08-13-2007, 12:14 AM
Only data. It's actually a 1 min chart and not a 5min as I may have mentioned previously and it is only one symbol.
NinjaTrader_Dierk
08-13-2007, 01:15 AM
I see. On trying to isolate you could do this:
- remove the NTExternalFeed strategy from your TS chart
- leave TS and NT running both
You would not see any data in NT but if the problem stays the same, then we know at least it's not related to the NT ATI functionality.