OPEN-SOURCE SCRIPT

Smoothed Heikin Ashi Trend on Chart - TraderHalai BACKTEST

تم تحديثه
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

Analysis:

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 -
Smoothed Heikin Ashi Trend on Chart - TraderHalai


Oscillator version -
Heikin Ashi Oscillator


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.

ملاحظات الأخبار
Cleanup logic to use market orders for more consistent backtest results
ملاحظات الأخبار
Add strategy tester display panel.
ashibacktestheikinOscillatorssmoothstrategytraderhalaitrendTrend AnalysisVolatility

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعد‎‎قوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

إخلاء المسؤولية