Harrocop

Triple MA HTF strategy - Dynamic Smoothing

The triple MA strategy is a simple but effective method to trade the trend. The advantage of this script over the existing triple MA strategies is that the user can open a lower time frame chart and select higher time frame inputs for different MA types mainting the visibility on the chart. The dynamic smoothing code makes sure the HTF trendlines are not jagged, but a fluid line visiable on the lower time frame chart. The script comes with a MA crossover and crossunder strategy explained below.

Moving Averages (MA) Crossover for Entry:
Long Entry: A long entry signal is triggered when the moving average line 1 crosses above the moving average line 2. This crossover indicates a potential shift in market sentiment towards the upside. However, to validate this signal, the strategy checks if the moving average 3 on a higher time frame (eg. 4 hour) is in an upward trend. This additional filter ensures that the trade aligns with the prevailing trend on a broader time scale, increasing the probability of success.

Short Entry: Conversely, a short entry signal occurs when the moving average line 1 crosses below the moving average line 2. This crossover suggests a possible downturn in market momentum. However, for a short trade to be confirmed, the strategy verifies that the moving average 3 on the higher time frame is in a downward trend. This confirmation ensures that the trade is in harmony with the overarching market direction.

Exit from Long Position: The strategy triggers an exit signal from a long position when the moving average line 1 crosses below the moving average line 2. This crossover indicates a potential reversal in the market trend, prompting the trader to close their long position and take profits or minimize losses.

Exit from Short Position: Similarly, an exit signal from a short position occurs when the moving average line 1 crosses above the moving average line 2. This crossover suggests a potential shift in market sentiment towards the upside, prompting the trader to exit their short position and manage their risk accordingly.

Features of the script
This Triple MA Strategy is basically the HTF Trend Filter displayed 3 times on the chart. For more infomation on how the MA with dynamic smoothing is calculated I recommend reading the following script:
For risk management I included a simple script to opt for % of eauity or # of contracts of in the instrument. For explanation on how the risk management settings work I refer to my ealier published script:
The strategy is a simplified example for setting up an entry and exit logic based on multiple moving avarages. Hence the script is meant for educational purposes only.


Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?