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


How to go beyond the 10000 GDI objects limit with NT7 or NT8?
Updated: Views / Replies:995 / 6
Created: by Baoumbox Attachments:0

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

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

  #1 (permalink)
Trading Apprentice
Quebec, Quebec , Canada
 
Futures Experience: Intermediate
Platform: Ninjatrader 7 - 8, TWS
Broker/Data: Kinetick, IB , MBT, TOS
Favorite Futures: Forex, US stocks
 
Posts: 8 since Mar 2015
Thanks: 3 given, 2 received

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

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
 
  #2 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,505 since Sep 2013
Thanks: 1,708 given, 3,719 received
Forum Reputation: Legendary

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

Reply With Quote
The following 2 users say Thank You to rleplae for this post:
 
  #3 (permalink)
Trading Apprentice
Quebec, Quebec , Canada
 
Futures Experience: Intermediate
Platform: Ninjatrader 7 - 8, TWS
Broker/Data: Kinetick, IB , MBT, TOS
Favorite Futures: Forex, US stocks
 
Posts: 8 since Mar 2015
Thanks: 3 given, 2 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
 
  #4 (permalink)
Elite Member
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,340 since Dec 2012
Thanks: 11,283 given, 7,092 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
Reply With Quote
The following user says Thank You to ratfink for this post:
 
  #5 (permalink)
Trading Apprentice
Quebec, Quebec , Canada
 
Futures Experience: Intermediate
Platform: Ninjatrader 7 - 8, TWS
Broker/Data: Kinetick, IB , MBT, TOS
Favorite Futures: Forex, US stocks
 
Posts: 8 since Mar 2015
Thanks: 3 given, 2 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
 
  #6 (permalink)
Elite Member
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,340 since Dec 2012
Thanks: 11,283 given, 7,092 received

Answer
This post has been selected as an answer to the original posters question Answer


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

Last edited by ratfink; March 5th, 2016 at 03:45 AM.
Reply With Quote
The following 2 users say Thank You to ratfink for this post:
 
  #7 (permalink)
Trading Apprentice
Quebec, Quebec , Canada
 
Futures Experience: Intermediate
Platform: Ninjatrader 7 - 8, TWS
Broker/Data: Kinetick, IB , MBT, TOS
Favorite Futures: Forex, US stocks
 
Posts: 8 since Mar 2015
Thanks: 3 given, 2 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:

Reply



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

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting NT7 indicators to NT8 for free Big Mike The Elite Circle 782 December 13th, 2017 06:26 PM
NT8 Get String Size (Used to be Graphics.MeasureString in NT7) Maza NinjaTrader Programming 4 January 15th, 2016 12:01 PM
Why would Strategy Performance differ in NT7 vs NT8? Aufidius NinjaTrader Programming 3 August 4th, 2015 04:31 AM
Inaccurate transfer of drawing objects from chart to chart in Ninja be fixed in NT8? moneypenny NinjaTrader 1 June 7th, 2014 11:31 AM
Flashing signal objects in NT7 aligator Traders Hideout 5 January 31st, 2011 11:35 PM


All times are GMT -4. The time now is 07:10 AM.

Copyright © 2017 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
Page generated 2017-12-18 in 0.16 seconds with 33 queries on phoenix via your IP 54.163.209.109