HAMA (Heiken-Ashi Moving Average) Candles are built using different moving average lengths for the open, high, low, and close. Those levels are then run through the Heiken-Ashi Candle formula to create a new hybrid candle on the chart. There is an additional Moving Average plotted as well for overall direction.

This may be used best for identifying trending markets. By referencing the HAMA Candle indicator, it may help guide you to stay in a trade a bit longer, or wait a bit longer before entering at the beginning of a potential trend.

We added a Gradient Color scheme option for a more colorful view of potential trend directional changes. The gradient code is taken from the Pinecoders Gradient Framework (Pro Advance/Decline Gradient example) at
There are three different Moving Average types to choose from. ( EMA , SMA , WMA ). All MA lengths can be modified. All colors can be modified. All options can be turned on or off.

This was previously an "invite-only" indicator, but we decided to publish it publicly and open source.

Zone Trading, Fracking, Automation, Coaching - -
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?