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提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。