- 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
- 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.datso 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.
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
| Parameter | Default | Description |
|---|---|---|
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
- Unzip the download. It contains an
MQL4orMQL5folder. - In MetaTrader choose File › Open Data Folder and copy the folder’s contents into the folder of the same name.
- Restart the terminal, or right-click in Navigator and choose Refresh. The source compiles on its own.
- 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.
- Turn on Algo Trading (AutoTrading in MT4).
- From Expert Advisors, drag either HAN or HAN_Z-Score onto a demo chart. Do not run both on the same symbol.
Changelog
-
v1.03 MT4 New November 30, 2026
- Published on TradeKit
-
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 reviewFAQ
Why does the EA trade against the candles?
Does it use a stop-loss?
What does the Z-Score version do, and when is it useful?
Can I run it on a symbol I also trade by hand?
Does the EA send any data out?
Related products
More Expert advisors and tools from the same family
Risk warning