Skip to main content
Cart Log in Sign up
Expert advisor

Heiken Ashi Naive: a plain Heiken Ashi strategy

An MT4 and MT5 expert advisor that trades a simple rule on Heiken Ashi candles, against the signal by default; ships with a HAN_Z-Score variant.

Platform

License

Price

≈

Version

You own this product. Go to My products
Get the demo

  • Automatic, instant delivery once payment confirms
  • Free updates for every future version
  • 12 months of technical support
  • Refunds under a transparent policy
  • Pay with USDT, BTC, ETH and more
  • Free: no payment, download it right now

Risk warning: Trading financial markets carries a risk of losing capital, and past performance does not guarantee future results. Terms & conditions

Product type
Expert advisor
Platforms
MT4 · MT5
Market / symbol
FX majors
Experience level
Intermediate
Delivery
File download from your dashboard
Last update
November 30, 2026
Broker
Any broker

Overview

As the name says, Heiken Ashi Naive is a simple take on Heiken Ashi trading. The EA looks at the last two Heiken Ashi candles and enters when the latest one is strong and has no wick on the opposite side. The unusual part is the default: it runs the strategy inverted, selling on strong bullish candles and buying on strong bearish ones.

The package holds two EAs. HAN is the base version. HAN_Z-Score uses the same rules, but after every winning trade it stops real trading and follows the signals on paper until a hypothetical trade loses; then it trades for real again.

  • Entries and exits based only on the shape of the last two Heiken Ashi candles
  • Direct or inverted execution with one input
  • Fixed lot or ATR-based position sizing
  • A Z-Score variant to test the “wait after a win” idea

The EA sets no stop-loss and no take-profit; a trade closes only on the opposite signal. Its author warns that it can wipe out an account. Treat it as a free, open strategy to study and test: past behaviour guarantees nothing, the risk of losing real money is real, and the first run belongs on a demo account.

Source and licence

This tool is the open-source project Heiken Ashi Naive by EarnForex.com, released under the Apache 2.0 licence. The source code is included in the download unchanged, with the licence text next to it. TradeKit provides the description, install guide and support. Original repository: github.com/EarnForex/Heiken-Ashi-Naive

Strategy logic

Bullish Heiken Ashi signal

  • The last closed candle is bullish and has no lower wick.
  • The candle before it is also bullish.
  • The last candle’s body is longer than the previous body.

The bearish signal is the mirror image: two bearish candles in a row, the latest with no upper wick and a longer body.

Entry

  • With Inverted = true (default): a bullish signal means sell, a bearish signal means buy.
  • With Inverted = false: a bullish signal means buy, a bearish signal means sell.
  • Only one trade is open at a time.

Exit

  • The exit condition is a little looser than the entry: two candles in the same direction, the latest with no wick on the opposite side. A longer body is not required.
  • In inverted mode a buy is closed when this appears on the bullish side, and a sell on the bearish side. In direct mode it is the other way round.
  • No stop-loss or take-profit is attached to the trade.

Position sizing

With MM = true the EA assumes the possible loss equals ATR × ATR_Multiplier and sizes the trade so that this loss equals Risk percent of the balance. Because there is no actual stop, the real loss can be larger.

HAN_Z-Score variant

  • After a real trade closes in profit, real trading is blocked.
  • While blocked, entries and exits are recorded virtually only.
  • The first virtual trade that closes at a loss lifts the block.
  • The state is saved in HAN_vt.dat so it survives a terminal restart.

Specifications

Requirements

  • MetaTrader 4 or MetaTrader 5 with the platform’s stock Heiken Ashi indicator
  • The author tested it on EUR/USD, D1; other symbols need your own testing
  • On MT5 the EA has no magic number and treats any position on the symbol as its own
  • Start on a demo account only
Platforms
MT4MT5
Delivery
Use case
Swing
Market
FX majors
Experience level
Intermediate

Compatible brokers

Which brokers this product works with, and which it works best with.

Works with every broker

No broker restriction: it works with any broker that offers the product's platform.

The broker choice is yours; TradeKit is not a broker. Check account terms before depositing. All brokers

Input parameters

Input parameters
ParameterDefaultDescription
InvertedWhen true the EA trades against the signal: sells on bullish candles, buys on bearish ones true When true the EA trades against the signal: sells on bullish candles, buys on bearish ones
LotsFixed lot size when MM is off 0.1 Fixed lot size when MM is off
MMATR-based position sizing from a risk percentage false ATR-based position sizing from a risk percentage
ATR_PeriodATR period used for sizing 20 ATR period used for sizing
ATR_MultiplierATR multiplier; the product is the assumed loss distance used for sizing 1 ATR multiplier; the product is the assumed loss distance used for sizing
RiskRisk percentage of the balance used for sizing 2 Risk percentage of the balance used for sizing
FixedBalanceIf above zero, used instead of the real balance in the size calculation 0 If above zero, used instead of the real balance in the size calculation
UseEquityInsteadOfBalanceSize from equity instead of balance false Size from equity instead of balance
SlippageMaximum tolerated slippage in points 100 Maximum tolerated slippage in points
MagicMagic number of the EA’s trades (MT4 version only) 1520122013 Magic number of the EA’s trades (MT4 version only)
FileNameFile that stores the virtual-trading state (HAN_Z-Score only) HAN_vt.dat File that stores the virtual-trading state (HAN_Z-Score only)

Install guide

  1. Unzip the download. It contains an MQL4 or MQL5 folder.
  2. In MetaTrader choose File › Open Data Folder and copy the folder’s contents into the folder of the same name.
  3. Restart the terminal, or right-click in Navigator and choose Refresh. The source compiles on its own.
  4. Check that MetaTrader’s stock Heiken Ashi indicator is in place: named Heiken Ashi in the Indicators folder on MT4, and Heiken_Ashi under Indicators › Examples on MT5. The EA reads its values from that indicator.
  5. Turn on Algo Trading (AutoTrading in MT4).
  6. From Expert Advisors, drag either HAN or HAN_Z-Score onto a demo chart. Do not run both on the same symbol.

Changelog

  1. v1.03 MT4 New November 30, 2026
    • Published on TradeKit
  2. v1.03 MT5 November 30, 2026
    • Published on TradeKit

Buyer reviews

No reviews yet.

Only verified buyers can review. Reviews are moderated before publishing.

Only verified buyers can review. Reviews are moderated before publishing.

Sign in to write a review

FAQ

Why does the EA trade against the candles?
Because Inverted is true by default. The author found the inverted version did better in his own tests. Set it to false to run the classic direction and compare the two yourself.
Does it use a stop-loss?
No. No stop or target is placed and a trade stays open until the exit signal. In a sharp one-way move the loss can grow large. This is the EA’s main limitation.
What does the Z-Score version do, and when is it useful?
After each winning trade it pauses real trading until a hypothetical trade loses. That only makes sense if wins and losses in the strategy’s results really do tend to alternate. If Z-Score is new to you, start with the base version.
Can I run it on a symbol I also trade by hand?
On MT5, better not. The MT5 version does not separate trades by magic number and may close your manual position on that symbol. The MT4 version manages only its own trades.
Does the EA send any data out?
No. It uses no DLLs and makes no internet connection. The Z-Score version only writes a small state file on your own computer.

Related products

More Expert advisors and tools from the same family

Compare Compare now