This input allows the user to define specific numbers (e.g., "3,11,17,29,41,47,53,59") that mark turning points in price action, which are checked using the bar_index modulo 60. If the current bar index matches one of these turning points, it triggers potential buy or sell signals. RSI (Relative Strength Index):
The RSI is calculated based on a user-defined period (rsi_period), typically 14, and used to indicate overbought or oversold conditions. The script defines overbought (70) and oversold (30) levels, which are used to filter buy or sell signals. Session Times:
The script includes predefined session times for major trading markets: New York: From 9:30 AM EST to 4:00 PM EST. London: From 8:00 AM GMT to 4:30 PM GMT. Asia: From 12:00 AM GMT to 9:00 AM GMT. These session times are used to restrict the buy and sell signals to specific market sessions. Key Levels:
The script calculates and plots key market levels for the current day and week: Daily High and Low: The highest and lowest prices of the current day. Weekly High and Low: The highest and lowest prices of the current week. These levels are plotted with different colors for visual reference. Signal Logic:
Buy Signal: Triggered when the current bar is a turning point (according to the ATT model), the RSI is below the oversold threshold, and the current time is within the active session times (New York, London, or Asia). Sell Signal: Triggered when the current bar is a turning point, the RSI is above the overbought threshold, and the current time is within the active session times. Signal Limitations:
A user-defined limit (max_signals_per_session) controls the maximum number of signals that can be plotted within each session. This prevents excessive signal generation. Plotting and Background Highlights:
Buy and Sell Signals: The script plots shapes (labels) above or below the bars to indicate buy or sell signals when the conditions are met. Background Highlight: The background color is highlighted in yellow when the current bar matches one of the defined ATT turning points. In Summary: The indicator combines multiple technical factors to generate trading signals:
Turning points in price action (based on custom ATT numbers), RSI levels (overbought/oversold), Market session times (New York, London, Asia), Key price levels (daily and weekly highs and lows). This combination helps traders identify potential buying and selling opportunities while considering broader market dynamics and limiting the number of signals during each session.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.