Select Page

Strategy Premise

HeikinAshi, also sometimes spelled HeikenAshi, means “average bar” in Japanese. The HeikinAshi technique can be used in conjunction with candlestick charts when trading securities to spot market trends and predict future prices. It’s useful for making candlestick charts more readable and trends easier to analyze

Heikin Ashi is better for price action however we can get optimum results by using some filters like ema, rsi, volume, etc. Further, we will demonstrate the steps to automate the simple Heikin-Ashi strategy.

Heiken Ashi chart

We can generated heikinashi values with a mathematical formula considering some of the previous candles values. There are two primary trade signals we can identify through the Heiken Ashi candlestick:

  • Bullish candlesticks have no wicks or very small wicks. They indicate a strong uptrend and excellent buying opportunities.
  • Small candlesticks can be characterize by a small body, big upper, and lower wicks. They signal a potential reversal.

Heikin ashi is better for price action however we can get optimum results by using some filters like ema, rsi, volume,etc. Further we will demonstrate the steps to automate simple heikin-ashi strategy.

Limitations on Heikin Ashi traditional charts:

  • Trading view free/pro users cant access HA charts for intraday
  • It shows wrong back testing results. When any strategy is applied on Heikin ashi  it would show best profit curve but that’s unreal because heikin ashi has so much of variation from real market price
  • It actually has chance to mislead people that heikin ashi is best always

Therefore we are going to setup an alternative heikin ashi strategy which can be applied on normal candlestick charts.

Advantages of Heikin Ashi strategy with normal candles over traditional:

  • The price is related to real markets and logic is related to renko block building this strategy will reduce slippages when applied on real markets
  • Trading view free users/pro users who cannot access renko charts can use this to apply renko on normal charts

Strategy Logic

Long Entry : when there is a cross over with Heikin Ashi candle and Ema +2 consecutive Heikin Ashi bullish candles Send LE

 Long Exit: Either when SL or Target is hit. If SL/TGT is not hit or trend is reversed Send LX and SE

Short Entry: When  there is cross under of Heikin Ashi value and Ema + 2 consecutive bearish candles Send SE

Short Exit: Either when SL or Target is hit. If SL/TGT is not hit or trend is reversed Send SX and LE

TradingView Settings

Step 1: Download the pinescript code from here.

STEP 2: Now open desired chart  in trading view with normal candlestick. Select desired time-frame of the chart. Go to pine editor section, remove the default code, paste the downloaded code,save the file and add to chart.

Heikin-Ashi Strategy Rules

STEP 3: Once strategy is applied on chart, click on settings to optimize parameters for your own trading.

  • Moving average type(MATYPE): Simple moving average (SMA) , Exponential moving average(EMA)
  • The Moving average length(MA LENGTH): length of moving average
  • Moving average Source: source used  for moving average calculation
  • Trade intraday: check this option to make all trades based on intraday session
  • INTRADAY SESSION: this will be trade session for intraday( works only if the previous option is checked)
  • USE STOPLOSS : check this to use stoploss
  • STOP LOSS: loss amount specified in Rupees (works only if the previous option is checked) Trade Quantity: Custom Trade quantity

STEP 4: Settings Alerts for Auto Trading with APIBridge. Just paste {{strategy.order.comment}} in alert window. That’s all, you are ready to trade!

Settings Alerts for Auto Trading with APIBridge

Do you want coding help to deploy your own strategy for live trading? Check our coding assistance.