NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 09-01-2009, 10:17 AM   #1
azuul
Member
 
Join Date: Mar 2009
Posts: 68
Thanks: 0
Thanked 0 times in 0 posts
Default "speed" of Pending orders = slow?

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

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
Last edited by azuul; 09-01-2009 at 10:38 AM.
azuul is offline  
Reply With Quote
Old 09-01-2009, 10:32 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

You should not be using NT6. This has been discontinued a long time ago. Please use NT6.5.
NinjaTrader_Josh is offline  
Reply With Quote
Old 09-01-2009, 10:35 AM   #3
azuul
Member
 
Join Date: Mar 2009
Posts: 68
Thanks: 0
Thanked 0 times in 0 posts
Default

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?
azuul is offline  
Reply With Quote
Old 09-01-2009, 10:56 AM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Orders can be in a pending state for any number of reasons. You would need to use TraceOrders = true to decipher what is happening.
NinjaTrader_Josh is offline  
Reply With Quote
Old 09-01-2009, 11:33 AM   #5
azuul
Member
 
Join Date: Mar 2009
Posts: 68
Thanks: 0
Thanked 0 times in 0 posts
Default

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 ?
azuul is offline  
Reply With Quote
Old 09-01-2009, 11:39 AM   #6
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Only thing I can suggest for you is for you to decrease the load.
NinjaTrader_Josh is offline  
Reply With Quote
Old 09-01-2009, 11:51 AM   #7
azuul
Member
 
Join Date: Mar 2009
Posts: 68
Thanks: 0
Thanked 0 times in 0 posts
Default

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!
azuul is offline  
Reply With Quote
Old 09-01-2009, 12:04 PM   #8
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

NT7 will have performance improvements across the board.
NinjaTrader_Josh is offline  
Reply With Quote
Old 09-01-2009, 12:13 PM   #9
azuul
Member
 
Join Date: Mar 2009
Posts: 68
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks,
make it using up all available CPU Power bevor slowing down!
I am really looking forward to it!
azuul is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What can cause slow "Loading Data..."? Zapzap Connecting 4 08-28-2009 09:18 AM
option to remove "buy ask" and "sell bid" on chart trader leontancfa Charting 1 07-01-2009 01:23 PM
summary of "strategy realized" is not equal "account performance, total net profit"" Fragolino Miscellaneous Support 1 02-19-2009 04:12 AM
Please add "Calmar" and "Sterling" ratios to Performance._Trades.TradesPerformance Elliott Wave Suggestions And Feedback 2 06-10-2008 09:57 PM
Explain TraceOrders "Ignored" & Replay Speed Impact on Fills OnePutt Automated Trading 1 09-08-2007 02:16 PM


All times are GMT -6. The time now is 06:09 PM.