This was a notorious resource hog until rewritten by Ninjatrader a couple of years ago in response to postings on BMT. I just realized that there are some obvious further improvements that can be made.
Performance on COBC false will be better, but on COBC true there won't be any improvement. COBC false is now the default, and PriceTypes other than Close are now supported.
This indicator is important because it is called by so many other indicators. Most of the indicators that I use were modified to call MAX only once per bar, but that's probably not the case for the indicators you are using, in which case there will be a performance improvement.
Once again this file is intended to REPLACE the file @MAX in your indicator folder.
"The Exponential Moving Average (EMA) is an indicator that indicates the exponential moving average value of a security's price over a period of days. When calculating an Exponential Moving Average (EMA), The Exponential Moving Average (EMA) applies more weight to recent prices than the SMA. What IS the SMA, anyway?..."
Here's one that is often used by itself, as well as being called on by many other indicators. There are two variables that depend only on the period, therefore only need to be calculated once, when the indicator first starts up. For some reason they were being calculated on every incoming tick, which is trivial to fix. Also, the term that is dependent on the previous value of the EMA only needs to be calculated on FirstTickOfBar.
The reduction in CPU demand is small for each instance, but you might have a lot of instances. This will run very well on COBC false. The addition of code to screen out redundant intrabar ticks (no price change, as in NT8) would reduce CPU demand on COBC false by around 70%.
Once again I am providing a cs file which is intended to replace the system indicator file, @EMA.cs.
Everyone knows what this looks like so I skipped the screen shot.
Revision B is the latest version. If you downloaded this before about 11:20PM Pacific Time on January 1 you do not have the correct file and should download it again.
The changes that I made must be very difficult to understand since nobody ever thought of making them before. The only reason they occurred to me is that I have two Advanced Degrees. A PhD in Neckwear Design and a Masters in Gibberish.
There is seldom any need to use it by itself, but the SUM indicator is important because it is often called upon by other indicators, which might be set to CalculateOnBarClose = false.
It is also inefficiently coded. Two logic tests that are performed on every tick only need to be performed once per bar.
Correcting this reduces the CPU load when CalculateOnBarClose is false. For COBC true, it does not make any difference.
Therefore consider REPLACING the existing file, @SUM, with this one, using Windows Explorer.. NOT the Ninjascript installation utility.
I don't think a screen shot is necessary for this one.
WRONG FILE had been uploaded. Corrected file uploaded at 2:45 PM ET January 3 2012. Thanks for bringing this to my attention, and please accept my apologies.
Pretty much, this indicator will create a MTF version of any indicator with 6 plots or LESS. In the indicator parameter just type in the name of the indicator you want with all the parameter exactly as it appears on a chart(excluding the input series). Choose your time frame and you are done
I added some functionality to the standard Tick Counter which comes with NT. The Tick Counter Custom allows you to set the size and font for the tick counter.
Additional Functionality:
I like to enter a trade when the tick count gets below a 100 ticks left on the current bar. However, watching the tick count was always cumbersome. So, I added functionality which changes the color of the bar once the tick count gets less than 100 ticks. Use the TickChange in the parameters to set to your custom level. The color of the bar is can be set to your preference.
Notes:
The % left no longer functions properly. So don't use it!!
If you don't want to use the warning bar color simply set it to 1.
More improvements to come!
Updates:
Ver1.2
Note: found a bug in ver1.1 code related to changing the Font. It seems when another indicator is added the tick counter disappears. Simplified this version to changing just the Font Size.
Version 3 - added PAN toggle button on tool bar, when pressed puts into "set" panning mode - no need to hold CNTRL key down. Select PAN button to exit this mode. Pressing and releasing CNTRL key exits "set" panning mode. ESC key press and release exits "set" panning mode.
Version 2 - code clean up and optimization
Many thanks to Devdas for the ScrollsLite code, my inspiration for MousePan.
For as long as I have used NT I have wanted the ability to pan around on the chart. I got used to using the control key to do the vertical and then use the control key to do the horizontal. I asked NT support why does the UI not offer the ability to hold the control key while on the graph and allow me to pan around... Panning around is what you do with google maps - we all know how to do that. Devdas introduced ScrollsLite the other day, but it did not offer exactly what I was looking for plus it has a little more than I need. So I started there and came up with MousePan. Install it on your Chart Panel, move the mouse to a location that you will not select a drawn item. For example don't move the mouse over a bar, keep it just off the bar. Next press the control key, then press the left mouse button. With both the control key and left mouse button pressed, drag the chart around, or pan around on the graph. Maybe someday the NT UI will have something like this built in. Again, many thanks to Devdas.