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)
There's no way to meaningfully speed up that indicator. It basically does the minimum that it needs to do. Make sure the market analyzer only uses the minimum number of bars back that you need. And if you only need the realtime numbers, you could try adding:
... around the whole thing, to avoid doing any calculation at all, except for the most recent bar. (you'd do this in a copy of ROC, and not ROC itself!)
Since ROC does so little, I don't know how much that would help, but it's the first thing I'd try.
It's the same thing, except in the second example you can hold a reference to any indicator, versus just the EMA. The main difference you'll see in practice is when indicators define properties for their plots. So, for instance, MACD has the "Avg" property, which gets you access to the dataseries for that particular plot. If you have "Indicator macd", then the best you can do is look up macd.Values[1]... because "Indicator" does not have a property named "Avg."
Performance-wise, it's a wash, though. It's the same objects. Just a matter of what you need access to through the variables you use.
Again, it's all the same objects doing the same computations... the only difference is what you can access through the variables you are holding. In this case, you are storing off a reference to a particular dataseries in the MACD. So, from that point forward, you have direct access to it, but not to the MACD. You didn't store off a reference to the MACD.
But, if all you were needing was the 'Avg' data, then it's all the same, and in fact a few cycles faster. Nothing you'd notice, so I tend to store references to the indicators for maximum flexibility.
Trading: Still not sure what is my favourite instrument.
Posts: 155 since Jul 2009
Thanks Given: 464
Thanks Received: 112
I am unable to download the indicator Double Stochastic Optimized, LATEST VERSION V1.4 on NT6.5. I am getting a message: Import failed. Ninja Trader could not decompress the Ninja Script Archive File: Version required to extract this entry not supported (45).
Can some one help me with this. Please.
Thanks
Steve
Thanks
Steve
Be like a JAGUAR. Crouching, perfectly still, waiting for the set up to come to you, then pouncing without hesitation or thought. You only need one to feed the family
Try deleting the info.xml file from the installation folder and paste in the .cs file into an empty shell. I have posted about this if you have questions.
But you may have to upgrade to NT7 to get the really good stuff on the forum, Zondor and I no longer even have 6.5 on our computers.
R.I.P. Andy Zektzer (ZTR), 1960-2010.
Please visit this thread for more information.
Hey guys, I thought many of you would enjoy and benefit from this thread. My intention is to have each poster reply and describe in as much detail as possible an indicator they want created for NinjaTrader.
I truely believe this person runderstands computer processing, especially when applied to NinjaTrader 7 & hope this is not considered an advertisement for this site as I have no idea if he is selling anything directly on this page.
R.I.P. Andy Zektzer (ZTR), 1960-2010.
Please visit this thread for more information.
I originally wrote code for solving NP-type problems and performance was the one benchmark we were measured on. When I originally started writing my trading system, I was surprised to see that most commercial libraries do not use data-persistence and loop through the entire data-series. To me that was like driving forward while looking backwards.
It took me some time to realize that most of the world, including most programmers, are not measured on performance and are focussed on getting the job done quickly instead of performance. However when you start running this kind of code on tick data, you very quickly will start maxing out.
This brings me to the question of NT. Though NT7 uses multi-threading the main charting loop is still a single thread. This means that your super-duper quad-core CPU will basically be no better than a single/dual core CPU with the same core and memory system (assuming you are not doing anything else). Back-testing and optimization does use the multiple threads and will run faster on more cores.
I have often faced performance problems with NT with the CPU maxing out at 25% (One core of a quad core). I now try to use CalculateOnBarClose or write my own sampled version for larger time-frame bars i.e. the indicator will update 10 times, during the bar but not on every tick. However this is still inefficient since the OnBarUpdate() method is called on every tick and the check for sampling does take some time.
I am attaching the basic sampled indicator from which other indicators can derive from. It is very much like the gomi indicators. There is also an example which converts the TSI to the SampledTSI.