Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I had to look up what hard faults are and then I discovered that my resource monitor doesn't display properly, according to Microsoft the work-around for an incompatibility with IE10 is that I reduce my display font size to 100%, but Windows now wants me to log out and log back in so this will have to wait.
I see a 25% CPU utilisation which is 100% on one core when loading the indi. As I said can't tell yet about hard faults (what should I see?)
You can discover what your enemy fears most by observing the means he uses to frighten you.
Can you help answer these questions from other members on NexusFi?
Then it is just a total cpu hog so the hard faults will likely be showing zero anyway and can be ignored. Definitely check for redundant drawing, calculation and object allocation operations, poor data fetch/create methods, excessive routine calling, unexpected looping, etcetera. Tests including dumb prints on small sets, eliminations and and binary chop style commenting out, your mission, should you choose to accept it, starts now.
hi cory, at first I didn't understand and just thought 'oh well' but then I saw you have an awesome 3,777 thank-yous and a higher thank-you to post ratio so I figure what you said is probably well worth heeding and I better find out what you mean. What confuses me is that all the calculations I do on history data need to be on every live bar as well, and in fact I don't think I've ever written anything for Ninja where that wasn't so. I do occasionally use the 'Historical' flag to switch when there is something hacky going on with historical vs live data or processing, but usually not. Could you expand a little on what you meant? Thanks.
You can discover what your enemy fears most by observing the means he uses to frighten you.
Thanks Cory for that. I see what you mean but I am doing it the way it is for the very reason that I can do that. I need to seriously think about whether I want to carry on that way. I also found the main culprit so if I can't fix it, I'll be into major re-design territory.
Now got a smaller screen resolution to make the resource manager work and no page faults. I might have to get more powerful reading glasses though.
I should employ Dilbert Jayavarman via freelancer.com to help.
Dumb prints are my forte - no worries there - although I suspect the eliminations I've managed so far owe more to the curry I had last night
Binary chop style commenting out sounds like an art form.
My experiments so far revealed some fairly embarrassing dog food but nothing that would go further than a peer code review if I was gainfully employed plus I've learnt too much about C#
It seems that .NET linq allows you to do all sorts of cool stuff but it runs like a snail. In all my C# Ninjascripting naivety I just wanted to find out if 2 lists of objects are the same, so I did this:
That alone would have been alright but every now and again the routine needs to go over info from all the bars - which is exactly what everyone here was warning about.
I might be able to send back my laptop cooler when this is sorted.
You can discover what your enemy fears most by observing the means he uses to frighten you.
I have achieved great performance with the OnBarUpdate after re-coding some of the loops I was doing, but I am still not satisfied with the performance of the Plot()
Can anybody who's been there give me a faster way of doing this:
'level' is my simple data class containing the prices to draw at and the bars to display on. I keep them in a list for each bar in a dictionary indexed by bar.
It seems ChartControl.GetXByBarIdx() and GetYByValue() are costly operations. Is there any other way of doing this?
You can discover what your enemy fears most by observing the means he uses to frighten you.
@Adamus: Nice coding so far. You can test that you don't call the Get.. functions every time. If you call it 2 times for 2 consecutive IDXs then you can interpolate the other values. You can also check if "List<SRLevel> levels = srLevels[i];" is copying your list (worse) - there is no need for this, work with srlevels[i] directly.
Your example references FirstTickOfBar and appears to be CalcOnbarclose=true. According to the ninja reference this would not work.
"10.4.3.26 FirstTickOfBar
Definition
Indicates if the incoming tick is the first tick of a new bar. This property is only of value in
scripts that run tick by tick which is when the CalculateOnBarClose property is set to false."
Did I miss something?
Regards,
Be yourself; everyone else is already taken. Oscar Wilde