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.
Some of the features
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 from fighting it.
Heiken Ashi Turning Points
As well as the standard candles, pjsHeikenAshi can optionally mark heiken Ashi turning points. These are areas on the chart where the trend changed. They often provide reactions on subsequent tests, even long after they have been tested, and re-tested, particularly on the longer time frames so you might want to mark them across your charts for future reference when they appear. If you are a short term scalper for instance, paying attention to the zones on the 60 minute chart should prove valuable. Here is an example of the 5m and 60m NQ. Here, the optional bar strength and turn point markers are enabled also. The time in the top right is the remaining candle time from my Priceline indicator.
HAMA mode – (Smoothed Heiken Ashi)
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.
A video of pjsHeikenAshi in motion
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!
- Optionally marks Heiken Ashi turning points. Important areas where the trend changes. You’ll want to observe how these play out for a while!
- Optionally show the current bar trend strength
- Unlike many other implementations, this indicator supports other indicators overriding its bar fill and outline colours, if you want to use that.
- Has a ‘Delta’ mode, that enables you to use pjsHeikenAshi like a typically indicator in another pane, shown as an oscillator, rather then the bars.
- 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, also.
Here are the settings.
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.
tbr – Updated turn zones with additional options. Fix to prevent off-screen future turn zones showing on the right edge if you had a large right margin and scrolled left.
2021.03.31 – Updated some config options to do with the turn zones. These are now an integral part and will be developed further. The turn zone behaviour has been changed slightly from prior versions. The turn zone is now ranged off the prior bar. This appears to give better results (there is logic behind this which will be covered later). New options added to mark the turn zones too. These are not buy and sell signals. I will add some video showing typical use, but there are a number of ways you can integrate them into your own strategy. They will work even if you have the Heiken Ashi bars turned off, so you can apply this over traditional candles if you wish. A “Minimum bars to keep zones” option has been added. This keeps the zone for at least X bars, before a re-test or break will remove it. This allows for some consolidation in the zone before the price moves off. We found the zones would be cleared too early in prior versions many times. The default is 1, which keeps the prior behaviour.
An option to show the bull/bear bar strength has been added. Of course, you can see this from the candles yourself and this option is off by default, but it can be added to the screen as an additional reminder of the current strength of the trend. On longer-term candles, like 60 minutes, etc., you might consider this a pre-trade sanity check – Are you going against a strong trend? Are your time-frame momentums aligned? It’s meant as an unobtrusive but obvious reminder as to what price is doing right now. The strength is based on the bodies of the candles over the ‘Period’ specified in the settings, so it’s relative to recent bars. You might use this on your normal primary price series chart, but you also might use it to display on your primary series chart, but based on a secondary series / longer time frame, for instance. If you are on the strongest bar of the period, you will be pinned at 100% bull/bear.
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.