R&D Blog
Heikin-Ashi Technique | Trading Strategy (Setup & Filter)
I. Trading Strategy
Concept: A trend-following model based on Heikin-Ashi bars. Research Goal: Performance verification of Heikin-Ashi bars with a trend filter. Specification: Table 1. Results: Figure 1-2. Trade Setup: Long Trades: (HaClose[i − 1] > HaOpen[i − 1]) & ((HaOpen[i − 1] − HaLow[i − 1]) ≤ ((HaHigh[i − 1] − HaLow[i − 1]) × BodyIndex). Short Trades: (HaClose[i − 1] < HaOpen[i − 1]) & ((HaHigh[i − 1] − HaOpen[i − 1]) ≤ ((HaHigh[i − 1] − HaLow[i − 1]) × BodyIndex). Index: i ~ Current Bar. HaOpen, HaHigh, HaLow, and HaClose are Heikin-Ashi OHLC prices defined below (Table 1). Trade Entry: Long Trades: A buy at the open is placed after a bullish Setup. Short Trades: A sell at the open is placed after a bearish Setup. Trade Exit: Table 1. Portfolio: 42 futures markets from four major market sectors (commodities, currencies, interest rates, and equity indexes). Data: 33 years since 1980. Testing Platform: MATLAB®.
II. Sensitivity Test
All 3-D charts are followed by 2-D contour charts for Profit Factor, Sharpe Ratio, Ulcer Performance Index, CAGR, Maximum Drawdown, Percent Profitable Trades, and Avg. Win / Avg. Loss Ratio. The final picture shows sensitivity of Equity Curve.
Tested Variables: Body_Index & Trend_Index (Definitions: Table 1):
Figure 1 | Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY | SPECIFICATION | PARAMETERS |
Auxiliary Variables: | Heikin-Ashi (1st bar): HaClose[1] = (Open[1] + High[1] + Low[1] + Close[1])/4 HaOpen[1] = (Open[1] + Close[1])/2 HaHigh[1] = High[1] HaLow[1] = Low[1] Heikin-Ashi (i > 1): HaClose[i] = (Open[i] + High[i] + Low[i] + Close[i])/4 HaOpen[i] = (HaOpen[i − 1] + HaClose[i − 1])/2 HaHigh[i] = max(High[i], HaOpen[i], HaClose[i]) HaLow[i] = min(Low[i], HaOpen[i], HaClose[i]) Index: i ~ Current Bar. | |
Setup: | Long Trades: (HaClose[i − 1] > HaOpen[i − 1]) & ((HaOpen[i − 1] − HaLow[i − 1]) ≤ ((HaHigh[i − 1] − HaLow[i − 1]) × BodyIndex). Short Trades: (HaClose[i − 1] < HaOpen[i − 1]) & ((HaHigh[i − 1] − HaOpen[i − 1]) ≤ ((HaHigh[i − 1] − HaLow[i − 1]) × BodyIndex). Index: i ~ Current Bar. | Body_Index = [0.0, 0.3], Step = 0.01; |
Filter: | Long trades: Close[i−1] > Close[i−1−Trend_Index] Short trades: Close[i−1] < Close[i−1−Trend_Index] Index: i ~ Current Bar; [i−1] ~ Doji Bar. | Trend_Index = [1, 141], Step = 5; |
Entry: | Long Trades: A buy at the open is placed after a bullish Setup. Short Trades: A sell at the open is placed after a bearish Setup. | |
Exit: | Heikin-Ashi Exit: Long Trades: A sell at the open is placed if (HaClose[i − 1] < HaOpen[i − 1]). Short Trades: A buy at the open is placed if (HaClose[i − 1] > HaOpen[i − 1]). Index: i ~ Current Bar. Stop Loss Exit: ATR(ATR_Length) is the Average True Range over a period of ATR_Length. ATR_Stop is a multiple of ATR(ATR_Length). Long Trades: A sell stop is placed at [Entry − ATR(ATR_Length) * ATR_Stop]. Short Trades: A buy stop is placed at [Entry + ATR(ATR_Length) * ATR_Stop]. | ATR_Length = 20; ATR_Stop = 6; |
Sensitivity Test: | Body_Index = [0.0, 0.3], Step = 0.01 Trend_Index = [1, 141], Step = 5 | |
Position Sizing: | Initial_Capital = $1,000,000 Fixed_Fractional = 1% Portfolio = 42 US Futures ATR_Stop = 6 (ATR ~ Average True Range) ATR_Length = 20 | |
Data: | 42 futures markets; 33 years (1980/01/01−2013/02/28) |
Table 1 | Specification: Trading Strategy.
III. Sensitivity Test with Commission & Slippage
Tested Variables: Body_Index & Trend_Index (Definitions: Table 1):
Figure 2 | Portfolio Performance (Inputs: Table 1; Commission & Slippage: $100 Round Turn).
IV. Rating: Heikin-Ashi Technique | Trading Strategy
A/B/C/D
Related Entries: Heikin-Ashi Technique (Setup & Exit)
Related Topics: (Public) Trading Strategies
CFTC RULE 4.41: HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY. SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.
RISK DISCLOSURE: U.S. GOVERNMENT REQUIRED DISCLAIMER | CFTC RULE 4.41
Codes: matlab/heikin-ashi/2