millerrh

Breakout Trend Follower Strategy

millerrh Cập nhật   
This strategy goes long when highs are broken and uses a trailing stop that follows swing lows. User can configure a back test date range and choose whether or not to only take trades above a selected moving average.

The desire for me to make this script was to try to capture those extreme breakouts that can occur after a consolidation/equilibrium pattern. This catches those using stop-buys as the entry. Out of all the scripts I have made thus far, this one is the one that has the best results. Time frames might vary due to commission structures, etc. I currently use this strategy on stocks on the 30-min time frame and crypto (with Coinbase's high fees) on the 2-hr time frame.
Phát hành các Ghi chú:
Cleaned up the code a bit and added some tooltips to the input to help people more.
Added the ability to select a second moving average on a different time frame to act as an entry filter. So if you wanted to screen for stocks only above their 50-day MA (as an example) it will show this in the chart now on all time frames.
Added the ability to filter out trades that have poor risk/reward based on daily ATR values. As an example, the default value is if the price delta between your buy stop and sell stop is more than 1 ATR, it won't make that buy.
Phát hành các Ghi chú:
Added the ability to filter out trades that are above a certain RSI level. The idea behind this filter is that you don't want to be buying breakouts when the previous bar is already overbought.
Phát hành các Ghi chú:
Some additional code cleanup, more user-configurability, chart cleanup for a more minimal look, and a bug fix.

  • Update to Pine v5
  • Pivot lookback now user-configurable
  • Add ability to hide historical pivots to clean up the chart
  • Current pivots now right-side rays instead of lines that go over the whole chart - this cleans up the chart and also allows you to see the exact pivot point generating the ray more easily.
  • Added a table showing the average daily range of the ticker as well as the range between current high/low pivots as a visual indicator of current "tightness" of the range vs. historical volatility. This is useful if using ADR as a filter.
  • Fixed a bug that occurred when using moving average filters where old pivots were retained as resting stop orders even when newer pivots were created below the moving average. Now all stop orders are cleared once price goes below the moving average so only the most recent swing highs are used as stop buy orders.

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 đồ?