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 and historical bars don’t always match realtime bars. 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 as supply and demand zones. 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.
- Has a mini chart mode to display charts, picture in picture style
- Can colour chart backgrounds based on trend, giving clear and constant reminders of the bias.
- 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.
- Many other improvements have also been added since release. Please read the ‘Updates’ section below to learn about any new features.
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.
2022.03.11 – Improvements to how supply and demand zones are generated, with more options. Items such as bar rejection strength. This means, price much reject from the zone for X bars before the zone is accepted as valid. After all, if price moves away and never comes back, it’s a better zone, no? There are also new options to limit just where the zone can be made. Must it be a local pivot within X bars, so we only put zones at local highs, for example. I urge you to have a play with these options. It can filter out many of the minor zones and leave you with the really imprortant ones.
2021.12.23 – Seems in a recent update I omitted the NullStyle chartstyle. Apologies. This would not affect upgrades, but the style would not have been installed on new installations. This would not effect the indicator, but you were missing this feature. This has been rectified. Please simply re-install to get the additional chartstyle (if you want it).
2021.11.25 – Update posted. Most of the new features covered here https://youtu.be/WmcJF0XDbl8
Some minor bug fixes to mini chart mode to do with layout in different panels. As a result, mini chart now works in different panels to the main panel. You can do multi time frame alignment things like this (chart template is included in download). Get creative! The background colouring here is set by the Long or Short bias, all green/all dark green, go! You can off course set any colour you want. I just have a thing for green at the moment 🙂 I’ve also added a maHAMA indicator templateinto the packadge as I seem to often get asked how to use the HAMA average mode. Also, exposed the Indecision bars as a public series for use in strategies.
2021.10.05 – Added SMA to smoothing options. Now calculates volumes in background. Added a ‘Colour chart background with BIAS (all BIAS changes)’ option. This is different from the original ‘Colour chart background with BIAS’, in that instead of painting the whole background one colour, you get a colour reflecting the bias changes per bar, so charts like this are possible.
or this (using hidden HA bars on main bar set, and HADelta mode on the panel below for longer term trend)
Note – If using the Background option in the main pane, you may wish to use the Ninjatrader shift and mouse wheel to change the ‘level’ to the highest, behind everything else (else your background colouring will be on top!).
2021.09.22 – I’ll post this one in a few days if all testing works out. This one has some performance tweaks (not that it could get much better, but any improvement is good), a few other minor tweaks and a big new feature! You can now use pjsHiekenAshi to show multiple charts on a single Ninjatrader 8 chart, picture in picture style. The chart need not be the same data series, or even type, so you can mix time, range, tick, etc. It all works. Even the delta mode and BIAS backgrounds work! I’ve also added a couple of indicator templates for the mini charts into the dsitribution so you can easily fire up a couple per these examples, if you wish.
This one is a test chart, where I am testing HA bars and Delta bars from 2 different time frames on Left and Right alignment.
Here is an example from one of my entry charts, where I now have larger bars and the delta bars from the higher time frame to the right of my low tick normal bars.
And a short live example where there I am using it just as a bar magnifier, so I can see the last few bars blown up for reading PA better.
Most of the normal bar options still work! Turn zones and a few other the other bits do not yet. To use this feature, add a new instance of the indicator to your chart and take a look at the ‘Virtual canvas’ settings group. You can tell the indicator to use an alternative data series in the usual way. There isn’t a limit to the number of these you can add.
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.
How to I use pjsHeikenAshi as a momentum indicator in ‘Delta’ mode? Here’s a quick live stream replay I did showing how to use this feature
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.
Please be sure to check the DOCUMENTATION
Email me via the web site if you want to get in touch.