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.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.