█ 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:
  • 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.
Breadth IndicatorsChart patternsCyclesdaytradingIndicesmeanreversionmonthQQQreversalSPDR S&P 500 ETF (SPY) Stocksswingtrading

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعد‎‎قوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

إخلاء المسؤولية