OPEN-SOURCE SCRIPT

ATT + Key Levels with Sessions

Key Features:
ATT Turning Point Numbers:

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.
Cycles

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?

คำจำกัดสิทธิ์ความรับผิดชอบ