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.

Heiken Ashi Ninjatrader Indicator

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 are supported. Our implementation will automatically size 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. 

pjsHeikenAshi indicator

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.


Ninjatrader 8


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.06.30 – A ‘delta’ mode has been added so you can use as an indicator panel as well as the normal ‘bar’ mode. See the example below.
HeikenAshi delta mode

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

6E Heiken Ashi Ninjatrader

6E with DtDb wicks and velocity bars enabled with pjsHeikenAshi for Ninjatrader 8


GC heiken Ashi

GC, trending beautifully, as it does. Easy to see with pjsHeikenAshi for Ninjatrader 8


2 instances of PJSHeikenAshi, one for the main bars, one for a 60 period EMA

2 instances of PJSHeikenAshi, one for the main bars, one for a 60 period EMA with wicks turned off and different colouring set. Various smoothing options are available.


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.

Real-world usage

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.

Contact us

Email me via the web site if you want to get in touch.


  • Cindy says:

    Hi, I’m trying to download the heiken ashi indicator but I’m getting the following error.

    Error! Failed to log the download request in the database table

    Is this still available?


    • pjsmith says:

      Hi – Please try again now. Unfortunately, I think you tried just as the site was upgrading a couple modules! Should be all OK now. I just also tested it my side and it seems fine. Let me know if any issues. Apologies for the timing!

  • Zeeman says:

    pjsmith – my email fxtradewin@gmail.com – I Need a dashboard base on range breakoout indicator — I have it for MT5
    can you please email

  • Gary Rodgers says:

    Hi, just dl’d the HA. Can you please give me the settings as follows: 2 tick renko with a 34 HAMA. want to see if this will do the same setup in NT8 that people use in MT4/5. Thank you.

  • Gary Rodgers says:

    I’m having trouble duplicating what you have on your NQ chart above. The moving average. That’s actually what I’m trying to get over the 2 tick renko.

  • Brad says:

    In the description above, you state, “HAOpen, HAClose, etc. are all exposed as plots for use in strategies and other automation”. Can you please explain, ideally with a bit of sample code, how to access these values from another indicator or strategy?

    • pjsmith says:

      Hi – This means that the HA values are exposed so you can easily use them with the NT strategy generator, etc. if you want to. Example strategy code below to buy when close > open. Hope this helps

      ” else if (State == State.DataLoaded)
      pjsHeikenAshi1 = pjsHeikenAshi(Close, @””, HATypes.SylvainVervoort, 100, true, true, false, false, false, 50, 0, true, false, UniversalMovingAverage.HMA, 4, 0, 25, 2.5, false, true);

      protected override void OnBarUpdate()
      if (BarsInProgress != 0)

      if (CurrentBars[0] < 1) return; // Set 1 if (pjsHeikenAshi1.HAClose[0] > pjsHeikenAshi1.HAOpen[0])
      EnterLong(Convert.ToInt32(DefaultQuantity), “”);


  • doc says:

    I cannot find a way to email you directly on the site in order to ask a specific question and i don’t really think it needs to be publicly posted. Please reply to my email submitted so that i can ask my questions. Thank you.

  • Jorge Martinez says:

    Can you please share with me the indicator screens that led to the 2 instance NQ chart showing the 1 minute HA bars and the EMA plot. Mine does not seem to coincide with yours and I feel it would be very useful. Also Looks like the up velocity bar color setting is on cyan and yet it draws bright lime green. Any tips to get the color to draw as I set it on the indicator setup screen? I have set NT to Nulltype.

  • Jorge says:

    Am loving the HA indicator but have specific questions.
    Is there an email address you can share to allow conversation relative to my questions please?Thanks.

  • Randy says:

    I Just downloaded your Heiken Ashi indicator for the 7-day trial a day ago but I cannot get it to appear at all on any style of chart no matter what settings I seem to use. I also have no idea what Velocity Bars means vs. regular HA Bars. Do I need to send you my Machine ID or something for the free trial to work? I found no contact email address at the website to accomplish that so I chose instead to make this post.

    • pjsmith says:

      Hi – It should work. Few things. Make sure you set it to display in the same window as the instrument. Velocity bars will give you an indication of how fast a bar completed (if you are using non-time based bars, like tick/range). it has no function on the minute or second bars, etc. Check your control centre ‘Log’ tab. If there are any issues, and error will likely be shown there. It will generally work right away out of the box, as it were, with no settings changes, and there really isn’t anything I can think of you could change to prevent that. I take it you did in fact manage to add it as an indicator to a chart?

  • Shah says:

    Hi Pjsmith,

    Thank you for the beautiful indicator. I’m currently building an algo bot, and planning to use HA candles. Does your HA candle can be accurately used with auto trading with real price of open and close for order submission? If this is possible, mind explain briefly how is this being achieved?

    • pjsmith says:

      Hi – Thanks. The answer is, yes, and no! I use it in exactly that scenario. During testing, in NT8, at least, Close[0] will always be the REAL current price. As you likely know, the opens on HA bars are not real. The Open, close etc., of the HA bars IS exposed via a plot for exactly this use in strategies etc. though, as HAOpen, HAClose, etc. So, as long as you submit orders using Close[0], bid, etc., – the usual Ninja methods, you’ll get the tick accurate price at the time. If you want to refer to the HA bars directly, use HAOpen[0], HAClose[0], etc. I hope this helps.

  • Sparky says:

    Hi, paid for the indicator, do activate it once you see this, thank you.

  • Ed says:


    I am thinking about purchasing your indicator, but I would like to know if this works for the e-mini contracts (ES, NQ, etc.). Also, does this work with other instruments, such as forex, stocks, etc.?

    Thank you!

    • pjsmith says:


      Yes – It works on emini contracts. I use it on them every day. It basically works on ANY instrument you can chart via NT8 and shows candles normally.

      All the best,

  • Ed says:

    Thank you for the reply, pjsmith. I myself have never applied (or seen anyone else) Heiken Ashi bars to Renko charts (or vice-versa). How would use a Heiken Ashi bar with a Renko chart? May I ask if you can post an example of the graphic above?

    • pjsmith says:

      I can’t post an image here, but happy to email you something. One of the reasons to build this as an indicator, rather than bar type, was specifically to apply it to ANY bar type. I use it on renko / unirenko all the time. I find it simply makes for a better-looking chart. Renko with range, for instance, something that is not possible with stock ninja, I really like.

  • Ed says:

    Thank you once again for the reply, pjsmith. Please email me something if possible – I am really looking forward to working with your indicators. Much appreciation in advance for this outstanding piece of coding!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.