TradeAutomation

ETF 3-Day Reversion Strategy

TradeAutomation Cập nhật   
Introduction: This strategy is a modification of the “3-day Mean Reversion Strategy” from the book "High Probability ETF Trading" by Larry Connors and Cesar Alvarez. In the book, the authors discuss a high-probability ETF mean reversion strategy for a 1-day time-frame with these simple rules:

  • The price must be above the 200 day SMA and below the 5 day SMA.
  • The low of today must be lower than the low of yesterday (must be true for 3 consecutive days)
  • The high of today must be lower than the high of yesterday (must be true for 3 consecutive days)
  • If the 3 rules above are true, then buy on the close of the current day.
  • Exit when the closing price crosses above the 5 day SMA.
In practice and in backtesting, I’ve found that the strategy consistently works better when using an EMA for the trend-line instead of an SMA. So, this script uses an EMA for the trend-line. I’ve also made the length of the exit EMA adjustable.

How it works:
The Strategy will buy when the buy conditions above are true. The strategy will sell when the closing price crosses over the Exit Moving Average

Plots:
Green line = Exit Moving Average (Default 5 Day EMA)
Blue line = 5 Day EMA (Used as Entry Criteria)

Disclaimer: Open-source scripts I publish in the community are largely meant to spark ideas that can be used as building blocks for part of a more robust trade management strategy. If you would like to implement a version of any script, I would recommend making significant additions/modifications to the strategy & risk management functions. If you don’t know how to program in Pine, then hire a Pine-coder. We can help!
Phát hành các Ghi chú:
This strategy is up nearly 10% YTD going long on QQQ and SPY. The original version was hard coded to only trade when the market is above the 200 day EMA. While backtesting index ETFs, I've found multiple instances where someone might not want to have trades filtered out below that trend. So, this new version adds an input that allows the user to select whether or not to enter trades when the market is below the 200 day EMA. The change improved backtest and YTD performance on SPY and QQQ. Cheers!

Want to build custom alerts and custom strategies? Interested in automated trading?

Hire me to code or automate your trading strategy, or schedule a free consultation at:
www.TradeAutomation.net
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 đồ?