OPEN-SOURCE SCRIPT
Turn of the Month Strategy on Steroids

█ STRATEGY DESCRIPTION
The "Turn of the Month Strategy on Steroids" is a seasonal mean-reversion strategy designed to capitalize on price movements around the end of the month. It enters a long position when specific conditions are met and exits when the Relative Strength Index (RSI) indicates overbought conditions. This strategy is optimized for use on daily or higher timeframes.
█ WHAT IS THE TURN OF THE MONTH EFFECT?
The Turn of the Month effect refers to the observed tendency of stock prices to rise around the end of the month. This strategy leverages this phenomenon by entering long positions when the price shows signs of a reversal during this period.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
2. EXIT CONDITION
█ ADDITIONAL SETTINGS
█ PERFORMANCE OVERVIEW
The "Turn of the Month Strategy on Steroids" is a seasonal mean-reversion strategy designed to capitalize on price movements around the end of the month. It enters a long position when specific conditions are met and exits when the Relative Strength Index (RSI) indicates overbought conditions. This strategy is optimized for use on daily or higher timeframes.
█ WHAT IS THE TURN OF THE MONTH EFFECT?
The Turn of the Month effect refers to the observed tendency of stock prices to rise around the end of the month. This strategy leverages this phenomenon by entering long positions when the price shows signs of a reversal during this period.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
- The current day of the month is greater than or equal to the specified `dayOfMonth` threshold (default is 25).
- The close price is lower than the previous day's close (`close < close[1]`).
- The previous day's close is also lower than the close two days ago (`close[1] < close[2]`).
- The signal occurs within the specified time window (between `Start Time` and `End Time`).
- There is no existing open position (`strategy.position_size == 0`).
2. EXIT CONDITION
- A Sell Signal is generated when the 2-period RSI exceeds 65, indicating overbought conditions. This prompts the strategy to exit the position.
█ ADDITIONAL SETTINGS
- Day of Month: The day of the month threshold for triggering a Buy Signal. Default is 25.
- Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
- This strategy is designed to exploit seasonal price patterns around the end of the month.
- It performs best in markets where the Turn of the Month effect is pronounced.
- Backtesting results should be analyzed to optimize the `dayOfMonth` threshold and RSI parameters for specific instruments.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。