PDA

View Full Version : "speed" of Pending orders = slow?


azuul
09-01-2009, 10:17 AM
Hi,

I did some performance tests and I discovered the following:

Even when I run 30 + simple crossover Strategies at the same time, memory usage is below 600MB and cpu usage almost nothing. (about 0-5% maximum load) (Intel 975i Extreme, Windows xp for now)

I changed the parameters so that I had plenty of executions - about 40-80 per Minute (only MARKET buy and sell orders for a certain crossover were submitted, no additional stop loss etc)

I watched the ExecutionsTab - sometimes there were 5-10 or more orders "pending" at the same time -

1) Every time when there were orders "pending" - Ninja trader almost got stuck
- I was unable to do anything with the program but wait for the orders to get filled !

These "Pending" MARKET orders seemed to "hang" for a long time, sometimes up to 10 seconds, although they are market orders???? (CPU or Memory usage did not change noticeably that time) Other programs etc. still behaved normal and I could work with them during that time.

What is the reason for this behavior? What is the hold up for the Application while submitting multipe orders at the same time / during the "pending" order state?

Is this showing only in simulated trading or also during live trading?

Is there any workaround for this? Or is it a bug/programming flaw of NT6.5?
Will this problem be gone in NT7?


It ultimately leads to a very instable NT - in the end it destroyed my Installation - after start comes immediatelly a messagethat NT needs to be shut down:mad:

you have a great program with great features, but unfortunatelly rather instable in this version. Placing Orders should be much much faster, instantly basically.
Its NOT the calculation for triggering the orders (=very fast) but the order handling itsself that is VERY slow somehow.

greetings

NinjaTrader_Josh
09-01-2009, 10:32 AM
You should not be using NT6. This has been discontinued a long time ago. Please use NT6.5.

azuul
09-01-2009, 10:35 AM
Sorry I meant NT 6.5, I am using the latest version!

Do you have any idea what the source of my observations might be?

NinjaTrader_Josh
09-01-2009, 10:56 AM
Orders can be in a pending state for any number of reasons. You would need to use TraceOrders = true to decipher what is happening.

azuul
09-01-2009, 11:33 AM
I actually had traceorders on true and I could not find anything unusual, no errors.

Maybe the reason for the crash was traceorder, since I have around 50 entries per second in the trace file - maybe the writing /reading of the trace filed caused the orders /NT to slow down?

I discovered that every few minutes, there are plenty of the following processes coming, always 4 in a row:
CBJ.AccountUpdateEventArgs.Process checking for : BuyingPower, CashValue, ExcessEquity, InitialMargin.

Then there are dozens of orders /executions for minutes without that this kind of process is being called once.

When is the CBJ.AccountUpdateEventArgs.Process called ?

NinjaTrader_Josh
09-01-2009, 11:39 AM
Only thing I can suggest for you is for you to decrease the load.

azuul
09-01-2009, 11:51 AM
I agree but I am not happy with this "solution" -

as I mentioned, the CPU is almost doing nothing, so its not a question of calculation power. About 95-99% is unused at any give time. There seem to be some very inefficient processes going on in NT6.5 - it becomes slow in itsself without using the available CPU Power? !

I really hope that NT7 will be a lot different from this! :confused:

NinjaTrader_Josh
09-01-2009, 12:04 PM
NT7 will have performance improvements across the board.

azuul
09-01-2009, 12:13 PM
Thanks,
make it using up all available CPU Power bevor slowing down!
I am really looking forward to it!