pjsHeikenAshi – A Heiken Ashi indicator for Ninjatrader 8
I have been using Heiken Ashi bars for many years. I developed my own because the available indicators at the time did not fulfil my requirements and Ninjatrader did not support them natively. NT8 has since added a crude version of HA. I call it crude because it is implemented within the restrictions of their bar types, which means all the numbers are rounded to the nearest tick size. This can create some odd-looking HA bars in instruments like NQ and you lose a lot of the patterns and smoothing effect you would typically see on some other platforms. For this reason, this version is implemented as an indicator, not a native bar type. Of course, I also wanted better performance, optional volatility smoothing, to be able to use the HA bars with range and Renko charts (not possible natively in NT), automation possibilities, and much more! This is it. The solution I came up with, refined and tested daily for many years now. It is the highest performing HA indicator I have tested and can produce some beautiful charts.
The traditional, and alternative Heiken Ashi calculations are available. Take a look at the 8 range MES chart below. This is what pjsHeikenAshi is good at. Keeping you in the trend, and probably more importantly, stopping you fighting it.
Full feature list
- Extremely efficient rendering with automatic degradation if required, during times of volatility on lower-performing systems (the NT chart lag issue!). A huge amount of time was spent on making the rendering up to 300% more efficient than some of the other HA implementations.
- Works on any time frame, with ANY underlying bar type (including non time-based charts)
- Don’t lose the ‘feel’ of the big, fast bars from time charts. pjsHeikenAshi will optionally detect abnormal volatility and optionally paint fast bars a different colour, so you know it was a fast move, even looking at historical data.
- Larger width candles (not enabled on very small bars as it’s pointless) are beautifully rendered with gradients. We spend a lot of time looking at candles. Let’s do them justice! 🙂
- Bar wicks and shadows are customisable for colour and line width
- HAOpen, HAClose, etc. are all exposed as plots for use in strategies and other automation
- ‘Equivolume’ style bars and our own idea, volumetric shaded bars are supported. Our implementation will automatically size or shade the bars according to the volume of the bars currently displayed on the screen. This gives you a relative bar size for the duration you are looking at, rather than the whole session, which we find much better given the volume at certain times (i.e. the open/close) can distort the numbers.
- Optionally, discreetly mark double tops and double bottoms on adjacent bars. This is surprisingly useful for scalpers!
- Unlike many other implementations, this indicator supports other indicators overriding its bar fill and outline colours, if you want to use that.
- Works with futures, FOREX, stocks, etc.
- Can override the existing plot, or use it in a separate indicator pane.
- Supplied free with a native NT add-on bar type which will efficiently hide the standard NT bars (if you desire).
- Many optional smoothing types are available, making this an excellent smoothed Heiken Ashi implementation.
Here are the settings.
Here is an example of the smoothing in action. This is referred to on many other indicators as HAMA. This is with wicks turned off. Note how much more information you get regarding the acceleration of a move than with a simple MA line via the size of the bars.
pjsHeikenAshi also includes a ‘Delta’ Mode. It’s not delta in the traditional sense, but it will show a plot you can put in an indicator panel, whilst keeping your traditional bars in the main chart window. You can actually get quite creative with this. Here, I’m using the delta mode plotted over several panes to show multi-market correlation.
So there you go.
What do you think? Have any ideas? Let me know in the comments section below.
You might like to take a look at some of my other Ninjatrader bits and pieces.
2021.02.21 – 2 new public series have been exposed. PublicISVelocitySeries, and PublicVelocityMSSeries. The first holds a numeric integer 1 if the bar is a velocity bar, zero otherwise. The second actually holds the time in milliseconds that bar took to complete. The series can be used in Strategy Builder, Bloodhound, your own code, etc. As a result of these changes, some other small updates were made which actually makes for some minor performance improvements (any performance improvement is always a good thing in NT!).
Also, Antialiasing support has been added for the graphics rendering. This, depending on your preferences can provide for smoother, softer looking shapes/graphics. It does come at a minor graphical performance cost, though I think it is unlikely you will notice any difference on most modern pc’s. The default is OFF to keep prior behaviour (and not all people like the fuzzier look, so try it yourself and see what you prefer). You will find the open in the ‘Visual’ settings. Here is a side by side, Antialiasing on, and off (click pic for larger version).
2020.12.10 – Few more minor updates, and the addition of something I’ve been using a lot of late. Volume coloured bars. There is already the ‘equivolume’ chart style in many platforms (and in pjsHeikenAshi), but it messes with the bar width and I don’t like the look of the chart so much. Recently, I found that varying the opacity of the bar colours works much better (for me), and looks nicer too, so, it’s included in this new version. In the indie properties, in the ‘volume’s section, enable the ‘volume gradient’ option. Once you get used to this, it is immensely useful…
2020.09.11 – A few minor updates, plus the addition of _experimental_ ‘turn zones’. This option can be turned on even if you have the candles turned off. Find this option here
and will look something like this. They are only valid for ‘untouched’ zones, i.e., they disappear once tested.
2020.05.28 – Minor update to rename internal smoothing class to prevent possible naming conflict with another often used smoothing class users might already have installed
2020.04.18 – Minor performance tweaks
2019.11.17 – Some bug fixes where smoothing is used as well as some additional new features and a tidying of the settings page.
Additional screenshots below
if you are using the pjsHeikenAshi indicator and want to hide the underlying NT8 bar type, select ‘NullStyle’ as the NT ‘Chart Style’, or select it from the bars drop down at the top of every chart. This is efficient as it stops the NT native bars plotting altogether. I’ve also bundled my ‘CandleStyleOneColour’, for free, in case you want to use that. It enables single colour candles, if you like those. Something NT8 natively does not do.
We are actual traders, trading real money and not just software developers trading SIM. We’ve traded with this indicator, live, for 1000’s of hours. We can offer some ideas for usage, though we strongly recommend you experiment and find your own edge. We’ll be posting more details here and some video content soon 🙂
if you already have a license key, please make sure you enter it in the indicator properties as part of the process of adding the indicator to your chart. Probably a good idea to ‘save as default’, so your key is remembered in your indicator template.
As usual, let me know below if any issues and I will try to resolve, time permitting.
This tool requires a license after the 7 day trial period. You can purchase one here. Please make sure the indicator meets your requirements, prior to purchase. Thanks for your support!
Can I install this on multiple computers? Yes – Up to 2 with the same licensed version of ninjatrader, with the same license key.
Can I disable volatility bars? Yes – Just set the numbers for the relevant configuration options to zero.
if you have any questions, please email us via the web site. If you already have the indicator, please be sure to provide your product key and machine id with the request. We cannot help you unless you provide your product key AND your machine id. Please note, your machine ID can be found in Ninjatrader, under the ‘Help, About’ menu.
Email me via the web site if you want to get in touch.