How to go beyond the 10000 GDI objects limit with NT7 or NT8? - futures io
futures io futures trading



How to go beyond the 10000 GDI objects limit with NT7 or NT8?


Discussion in NinjaTrader

Updated
    1. trending_up 1,834 views
    2. thumb_up 6 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

How to go beyond the 10000 GDI objects limit with NT7 or NT8?

(login for full post details)
  #1 (permalink)
Quebec, Quebec , Canada
 
 
Posts: 8 since Mar 2015
Thanks: 3 given, 5 received

Hello,

My current workspaces have too much GDI objects and make Ninjatrader crash when changing workspaces. I've read on google about changing the maximum in the registry to over 10000 handles with the GDIProcessHandleQuota(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\GDIProcessHandleQuota)
but it seems like a maximum I can't unlock. Does someone else achieved a way to go over this number?

I've tried to add desktop heap too but doesnt work neither (reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contr ol\Session Manager\SubSystems" /v windows).

I'm using windows 10 64 bit. I've seen post about other people having done this in previous windows but not yet on this new windows.

Reply With Quote

Can you help answer these questions
from other members on futures io?
Webinar: Finding your own way in trading w/Adam Grimes
The Elite Circle
Which kind of Blockvolume is visible? - order processing
Emini and Emicro Index
What blockvolume is visible? - order processing
NinjaTrader
Short Interest Ratio indicator?
ThinkOrSwim
Work with historical tcks data on MUltichart NET PowerLa …
MultiCharts
 
 
(login for full post details)
  #2 (permalink)
Gits (Hooglede) Belgium
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,991 since Sep 2013
Thanks: 2,437 given, 5,801 received

10.000 objects seem a lot to me, the question is do you really need > 10.000 objects
is there no other solution to the problem you are trying to solve...

Feel free to share more about what you are trying to do

Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to rleplae for this post:
 
(login for full post details)
  #3 (permalink)
Quebec, Quebec , Canada
 
 
Posts: 8 since Mar 2015
Thanks: 3 given, 5 received



rleplae View Post
10.000 objects seem a lot to me, the question is do you really need > 10.000 objects
is there no other solution to the problem you are trying to solve...

Feel free to share more about what you are trying to do

The thing is that I don't actually have 10000 objects showed at the same time more like 3000 but when I change workspaces (something that I do often) NT always crash with my 10 workspaces. Since NT just go over for a second maximum thats why I wanted to go over 10000 to keep NT stable. I like all of my workspaces open at first and idealy I would like to find a solution in this way.

I know its not common to go over 10k and google has told me so too since theres really not much on the subject. I just wonder why I can't unlock it with windows 10. On my actual setup I've got a way to make it work with 9 workspaces without problem but I plan going to 4k monitor soon so I'll open more charts and I'm affraid I'll come accross this problem once again.

Reply With Quote
 
(login for full post details)
  #4 (permalink)
Birmingham UK
 
Experience: Intermediate
Platform: NinjaTrader
Broker: TST/Rithmic
Trading: YM/Gold
 
ratfink's Avatar
 
Posts: 3,651 since Dec 2012
Thanks: 17,422 given, 8,403 received


Baoumbox View Post
The thing is that I don't actually have 10000 objects showed at the same time more like 3000 but when I change workspaces (something that I do often) NT always crash with my 10 workspaces. Since NT just go over for a second maximum thats why I wanted to go over 10000 to keep NT stable. I like all of my workspaces open at first and idealy I would like to find a solution in this way.

I know its not common to go over 10k and google has told me so too since theres really not much on the subject. I just wonder why I can't unlock it with windows 10. On my actual setup I've got a way to make it work with 9 workspaces without problem but I plan going to 4k monitor soon so I'll open more charts and I'm affraid I'll come accross this problem once again.

Well, as @rleplae was suggesting it seems unreasonable to need to do that, your brain certainly won't be able to make use of all of them..

However, more likely it is simply code that is creating resources but not releasing them, that's where I would start to look.

I run vast workspaces and chart and indicator combinations and NT (7) usually has no problem with resource allocation or cpu usage unless the code is wrong. There is however, as you point out, a fixed per process GDI limit on Windows, and since GDI's get taken from the system wide pool that seems reasonable to me. Looking for resource management issues first, and then whether you really need to do something the way it is being done would definitely be my input.

Cheers

Travel Well
Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to ratfink for this post:
 
(login for full post details)
  #5 (permalink)
Quebec, Quebec , Canada
 
 
Posts: 8 since Mar 2015
Thanks: 3 given, 5 received


ratfink View Post
Well, as @rleplae was suggesting it seems unreasonable to need to do that, your brain certainly won't be able to make use of all of them..

However, more likely it is simply code that is creating resources but not releasing them, that's where I would start to look.

I run vast workspaces and chart and indicator combinations and NT (7) usually has no problem with resource allocation or cpu usage unless the code is wrong. There is however, as you point out, a fixed per process GDI limit on Windows, and since GDI's get taken from the system wide pool that seems reasonable to me. Looking for resource management issues first, and then whether you really need to do something the way it is being done would definitely be my input.

Cheers

It's maybe something else that create the crash but NT technician told me there was a problem in the log saying that NT wasnt able to create an handle and that it make the program crash. If I close any of my 10 workspaces the crash doesn't occur no more and it begun when I've created 8 new charts on 2 workspaces.

Can you explain what do you mean by code creating ressources but not releasing them or how to see this?

Does its only user created indicators or original NT7 indicators can do this too?

Reply With Quote
 
(login for full post details)
  #6 (permalink)
Birmingham UK
 
Experience: Intermediate
Platform: NinjaTrader
Broker: TST/Rithmic
Trading: YM/Gold
 
ratfink's Avatar
 
Posts: 3,651 since Dec 2012
Thanks: 17,422 given, 8,403 received


Baoumbox View Post
It's maybe something else that create the crash but NT technician told me there was a problem in the log saying that NT wasnt able to create an handle and that it make the program crash. If I close any of my 10 workspaces the crash doesn't occur no more and it begun when I've created 8 new charts on 2 workspaces.

Yes, I would expect to see that, and as it is a per-process limit it should be code inside NT or a user indicator code that is the cause.


Baoumbox View Post
Can you explain what do you mean by code creating ressources but not releasing them or how to see this?

For example creating custom pens or styles or other drawing objects in a custom Plot method but never calling 'Dispose' when they're done with. Unfortunately there is no way to tie back system pool GDI's to particular user process objects that I know of, on the other hand I am not an expert on this so there might be. This is my best guess as to where the problem is. Unless you're not using custom Plot methods in which case it isn't.


Baoumbox View Post
Does its only user created indicators or original NT7 indicators can do this too?

I doubt original NT indicators will do this. However, it would be worth eliminating indicators from your workspaces one or two at a time (or binary chop if you have lots) to see if you can pin down a specific culprit.

I would also think seriously about the number of bars involved in charts that you are using and whether a higher level timeframe would be more appropriate. Try simple things like just halving the number of days or bars loaded, or using minutes instead of ticks, or whatever. If you are using time-axis based drawing does it need to be so often, etc, etc.

If you remain convinced of a particular low level data requirement then you could always embed a re-use object scheme in any drawing (e.g. use something like (CurrentBar % 500) in place of CurrentBar in any unique ID drawing tags) where you really don't need to see ancient stuff but still want the latest stuff to be in high detail. We usually convince ourselves in OCD fashion that we have to have t all when in fact we rarely look at it usefully. That should only be neccessary where ancient values are still essential to some form of calculation but the visible results are not. I doubt this will be causing the issue in any case and is more just for performance.

There are many other aggregation schemes (e.g. lots of small rectangles into large ones) that could be employed to get around this, but first I would really want you to understand where it's coming from and if you really need that code or whether it can just be replaced by something better or bugfree. I have massively cut down chart load times by doing a lot of these sort of things (in fact startup times would be a good clue as to where to start looking, if a chart is slow to load it's probably a duffer.)

Again, most of the above are more for performace (cpu and memory) improvement and not resource allocation issues. It is possible to draw millions of things without hitting a GDI limit.

Cheers

Travel Well
Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to ratfink for this post:
 
(login for full post details)
  #7 (permalink)
Quebec, Quebec , Canada
 
 
Posts: 8 since Mar 2015
Thanks: 3 given, 5 received


ratfink View Post
Yes, I would expect to see that, and as it is a per-process limit it should be code inside NT or a user indicator code that is the cause.


For example creating custom pens or styles or other drawing objects in a custom Plot method but never calling 'Dispose' when they're done with. Unfortunately there is no way to tie back system pool GDI's to particular user process objects that I know of, on the other hand I am not an expert on this so there might be. This is my best guess as to where the problem is. Unless you're not using custom Plot methods in which case it isn't.



I doubt original NT indicators will do this. However, it would be worth eliminating indicators from your workspaces one or two at a time (or binary chop if you have lots) to see if you can pin down a specific culprit.

I would also think seriously about the number of bars involved in charts that you are using and whether a higher level timeframe would be more appropriate. Try simple things like just halving the number of days or bars loaded, or using minutes instead of ticks, or whatever. If you are using time-axis based drawing does it need to be so often, etc, etc.

If you remain convinced of a particular low level data requirement then you could always embed a re-use object scheme in any drawing (e.g. use something like (CurrentBar % 500) in place of CurrentBar in any unique ID drawing tags) where you really don't need to see ancient stuff but still want the latest stuff to be in high detail. We usually convince ourselves in OCD fashion that we have to have t all when in fact we rarely look at it usefully. That should only be neccessary where ancient values are still essential to some form of calculation but the visible results are not. I doubt this will be causing the issue in any case and is more just for performance.

There are many other aggregation schemes (e.g. lots of small rectangles into large ones) that could be employed to get around this, but first I would really want you to understand where it's coming from and if you really need that code or whether it can just be replaced by something better or bugfree. I have massively cut down chart load times by doing a lot of these sort of things (in fact startup times would be a good clue as to where to start looking, if a chart is slow to load it's probably a duffer.)

Again, most of the above are more for performace (cpu and memory) improvement and not resource allocation issues. It is possible to draw millions of things without hitting a GDI limit.

Cheers


I didn't achieve to go past the 10000 GDI but you made me check even closer every properties and data loaded from my chart. I was thinking I had checked throughout all of my workspaces before, to eliminate the superfluous, but it seems I've missed 2 workspaces charts historic that I've cut by 6. It made the difference to make NT stable.

Thank you for your time.

Reply With Quote
The following user says Thank You to Baoumbox for this post:


futures io Trading Community Platforms and Indicators NinjaTrader > How to go beyond the 10000 GDI objects limit with NT7 or NT8?


Last Updated on March 8, 2016


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts