Smoothed Heikin Ashi Trend on Chart - TraderHalai BACKTEST

TraderHalai Pro Telah dikemaskini   
Smoothed Heikin Ashi Trend on chart - Backtest

This is a backtest of the Smoothed Heikin Ashi Trend indicator, which computes the reverse candle close price required to flip a Heikin Ashi trend from red to green and vice versa. The original indicator can be found in the scripts section of my profile.

This particular back test uses this indicator with a Trend following paradigm with a percentage-based stop loss. 

Note, that backtesting performance is not always indicative of future performance, but it does provide some basis for further development and walk-forward / live testing.

Testing was performed on Bitcoin , as this is a primary target market for me to use this kind of strategy.

Sample Backtesting results as of 10th June 2022:

Backtesting parameters:

Position size: 10% of equity

Long stop: 1% below entry

Short stop: 1% above entry
Repainting: Off

Smoothing: SMA
Period: 10

8 Hour:

Number of Trades: 1046

Gross Return: 249.27 %
CAGR Return: 14.04 %

Max Drawdown: 7.9 %
Win percentage: 28.01 %

Profit Factor (Expectancy): 2.019 

Average Loss: 0.33 % 

Average Win: 1.69 %

Average Time for Loss: 1 day

Average Time for Win: 5.33 days

1 Day:

Number of Trades: 429

Gross Return: 458.4 %
CAGR Return: 15.76 %

Max Drawdown: 6.37 %

Profit Factor (Expectancy): 2.804

Average Loss: 0.8 % 

Average Win: 7.2 %
Average Time for Loss: 3 days

Average Time for Win: 16 days

5 Day:
Number of Trades: 69

Gross Return: 1614.9 %
CAGR Return: 26.7 %

Max Drawdown: 5.7 %

Profit Factor (Expectancy): 10.451

Average Loss: 3.64 %

Average Win: 81.17 %

Average Time for Loss: 15 days

Average Time for Win: 85 days


The strategy is typical amongst trend following strategies with a less regular win rate, but where profits are more significant than losses. Most of the losses are in sideways, low volatility markets. This strategy performs better on higher timeframes, where it shows a positive expectancy of the strategy.

 The average win was positively impacted by Bitcoin’s earlier smaller market cap, as the percentage wins earlier were higher.

 Overall the strategy shows potential for further development and may be suitable for walk-forward testing and out of sample analysis to be considered for a demo trading account.

Note in an actual trading setup, you may wish to use this with volatility filters, combined with support resistance zones for a better setup.

As always, this post/indicator/strategy is not financial advice, and please do your due diligence before trading this live.

Original indicator links:

On chart version -

Oscillator version -

Update - 27/06/2022

Unfortunately, It appears that the original script had been taken down due to auto-moderation because of concerns with no slippage / commission. I have since adjusted the backtest, and re-uploaded to include the following to address these concerns, and show that I am genuinely trying to give back to the community and not mislead anyone:

1) Include commission of 0.1% - to match Binance's maker fees prior to moving to a fee-less model.
2) Include slippage of 10 ticks (This is a realistic slippage figure from searching online for most crypto exchanges)
3) Adjust account balance to 10,000 - since most of us are not millionaires.

The rest of the backtesting parameters are comparable to previous results:

Backtesting parameters:

Initial capital: 10000 dollars
Position size: 10% of equity

Long stop: 2% below entry

Short stop: 2% above entry
Repainting: Off

Smoothing: SMA
Period: 10

Slippage: 10 ticks
Commission: 0.1%

This script still remains to shows viability / profitablity on higher term timeframes (with slightly higher drawdown), and I have included the backtest report below to document my findings:

8 Hour:
Number of Trades: 1082

Gross Return: 233.02%
CAGR Return: 14.04 %

Max Drawdown: 7.9 %
Win percentage: 25.6%

Profit Factor (Expectancy): 1.627
Average Loss: 0.46 % 

Average Win: 2.18 %

Average Time for Loss: 1.33 day

Average Time for Win: 7.33 days

Once again, please do your own research and due dillegence before trading this live. This post is for education and information purposes only, and should not be taken as financial advice.

Catatan Pelepasan: Cleanup logic to use market orders for more consistent backtest results
Catatan Pelepasan: Add strategy tester display panel.
Skrip sumber terbuka

Dalam semangat TradingView yang sebenar, penulis skrip ini telah menerbitkannya dengan menggunakan sumber terbuka supaya pedagang-pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda dapat menggunakannya secara percuma tetapi penggunaan semula kod ini dalam penerbitan adalah dikawalselia oleh Peraturan Dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.


Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?