lifestylemaniacsrt

Daily Heikin Ashi Strategy

Introducing the latest version of the Daily Heikin Ashi Strategy, enhanced with optional Moving Average (MA) functionality for trend confirmation. This strategy is primarily effective for Bitcoin (BTCUSD) and other cryptocurrencies, and can also be applied to long-term uptrending assets.

Key Features:

Market Focus: Best suited for Bitcoin and adaptable to other cryptocurrencies and trending assets.
Trading Style: Offers both long and short trading options, with a primary focus on long positions.
Timeframe: Specifically designed for the Daily chart.

Strategy Mechanics:

Entry Signal for Longs: Initiates a long position when a green Heikin Ashi candle follows a red candle. If the MA feature is enabled, the entry is further confirmed when the price is above the 100-day MA.
Exit Signal for Longs: The strategy exits a long position upon the appearance of a red Heikin Ashi candle. An additional exit check can be activated for more conservative trade management.
ntry Signal for Shorts (when MA is used): A short position is entered when a red Heikin Ashi candle follows a green one, provided the price is below the 100-day MA.
Exit Signal for Shorts (when MA is used): Exits a short position when a green Heikin Ashi candle appears, with the option for an additional exit check.

Backtesting and Customization:

The strategy has been tested with different exit criteria for various assets to determine the most effective approach.
Initial capital is set at $100 with a default quantity value of 10% of equity, incorporating realistic slippage and commission values.

Performance and Application:

Demonstrates profitability across Bitcoin and various cryptocurrencies' entire history.
Also applicable to Gold, Silver, S&P 500, Nasdaq 100, Dow Jones 30, and top companies, showing profitability.

Risk Management and Realism in Backtesting:

Includes standard slippage (2%) and a low commission rate (0.1%) in backtesting.
Realistic account size and trade sizing to maintain sustainable risk levels.
Aims for a comprehensive dataset to produce a reliable number of trades for analysis.
版本注释:
This Pine Script code implements the Heikin Ashi Strategy, enhanced with optional Moving Average (MA) functionality for trend confirmation. This strategy is designed for trading Bitcoin (BTCUSD) and other cryptocurrencies, and it can also be applied to long-term uptrending assets.

Key Features:

1. Market Focus: This script is best suited for Bitcoin but can be adapted for other cryptocurrencies and trending assets.
2. Trading Style: It offers both long and short trading options, with a primary emphasis on long positions.
3. Timeframe: Specifically tailored for the Daily chart or any other chart.

Strategy Mechanics:

- Entry Signal for Longs: A long position is initiated when a green Heikin Ashi candle follows a red one. If the MA feature is enabled, the entry is further confirmed when the price is above the 100-day MA. You can specify from 1 to 10 candles for the entry rule if you want.
- Exit Signal for Longs: The strategy exits a long position when a red Heikin Ashi candle appears. You can specify from 1 to 10 candles for the exit rule if you want.
- Entry Signal for Shorts: A short position is initiated when a red Heikin Ashi candle follows a green one. If the MA feature is enabled, the entry is further confirmed when the price is below the 100-day MA. You can specify from 1 to 10 candles for the entry rule if you want.
- Exit Signal for Shorts: The strategy exits a long position when a green Heikin Ashi candle appears. You can specify from 1 to 10 candles for the exit rule if you want.

Additional Inputs and Properties:

- Only Longs? and Only Shorts?: These Boolean inputs allow you to specify whether to enter only long or short trades, providing flexibility in your trading strategy.
- Use Moving Average?: This Boolean input lets you choose whether to incorporate the 100-day Moving Average for trend confirmation.
- Entry Candles Length and Exit Candles Length: These inputs allow you to customize the number of candles to check for entry and exit conditions, fine-tuning your strategy.
- Initial Capital: Sets the starting capital for backtesting at $100.
- Default Quantity Value and Default Quantity Type: Specify the default quantity and type for trade sizing, making it adaptable to your equity management strategy.
- Slippage and Commission Value: Incorporates realistic slippage (2%) and a low commission rate (0.1%) in backtesting.
- Margin Long and Margin Short: Define margin requirements for long and short positions.
- Use Bar Magnifier: Enables or disables the bar magnifier for accurate calculations.

Performance and Application:

- This script demonstrates profitability across Bitcoin and various cryptocurrencies' entire historical data.
- It is also applicable to Gold, Silver, S&P 500, Nasdaq 100, Dow Jones 30, and top companies, showing profitability.

Risk Management and Realism in Backtesting:

- The script aims to provide a comprehensive dataset to produce a reliable number of trades for analysis.
- It incorporates standard slippage, low commission rates, and realistic account size and trade sizing to maintain sustainable risk levels.

Please note that this Pine Script is designed for use on the TradingView platform and should be used in conjunction with other risk management measures and due diligence when trading.
版本注释:
Update

  • Remove use_bar_magnifier parameter, as it is only for premium users
  • Added strategy parameters for different asset classes
版本注释:
Release notes
  • Updated Crypto strategy parameters
  • Added RSI filter
版本注释:
  • Changed the moving average from 100 to 50
  • Included moving average crossover and crossunder for entries

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?