This indicator is designed to help traders identify significant price points by marking new highs and lows over two distinct timeframes—a long-term and a short-term period. It achieves this by drawing optional channel lines that outline the highest highs and lowest lows over the chosen time periods and by plotting visual markers (triangles) on the chart when a new high or low is detected.
Key Features:
Dual Timeframe Analysis: Long Term: Uses a user-defined “Time Period” (default 52) and “Time Unit” (default: Weekly) to determine long-term high and low levels. Short Term: Uses a separate “Time Period” (default 50) and “Time Unit” (default: Daily) to compute short-term high and low levels.
Optional Channel Display: For both long and short term periods, you have the option to display a channel by plotting the highest and lowest values as lines. This visual channel helps to delineate the range within which the price has traded over the selected period.
New High/Low Markers: The indicator identifies moments when the highest high or lowest low is updated relative to the previous bar. When a new high is established, an up triangle is plotted above the bar. Conversely, when a new low occurs, a down triangle is plotted below the bar. Separate input toggles allow you to enable or disable these markers independently for the long-term and short-term setups.
Inputs and Settings:
Long Term High/Low Period Settings: Show New High/Low? (STW): Toggle to enable or disable the plotting of new high/low markers for the long-term period. Time Period: The number of bars used to calculate the highest high and lowest low (default is 52). Time Unit: The timeframe on which the long-term calculation is based (default is Weekly). Show Channel? (SCW): Toggle to display the channel lines that connect the long-term high and low levels.
Short Term High/Low Period Settings: Show New High/Low?: Toggle to enable or disable the plotting of new high/low markers for the short-term period. Time Period: The number of bars used for calculating the short-term extremes (default is 50). Time Unit: The timeframe on which the short-term calculations are based (default is Daily). Show Channel?: Toggle to display the channel lines for the short-term highs and lows.
Indicator Logic:
Channel Calculation: The script uses the request.security function to pull data from the specified timeframes. For each timeframe: It calculates the lowest low over the defined period using ta.lowest. It calculates the highest high over the defined period using ta.highest. These values can be optionally plotted as channel lines when the “Show Channel?” option is enabled.
New High/Low Detection: For each timeframe, the indicator compares the current high (or low) with its immediate previous value: New High: When the current high exceeds the previous bar’s high, an up triangle is drawn above the bar. New Low: When the current low falls below the previous bar’s low, a down triangle is drawn below the bar.
Usage and Interpretation:
Trend Identification: When new highs (or lows) occur, they can signal the start of a strong upward (or downward) movement. The indicator helps you visually track these critical turning points over both longer and shorter periods.
Channel Breakouts: The optional channel display offers additional context. Price movement beyond these channels may indicate a breakout or a significant shift in trend.
Customizable Timeframes: You can adjust both the time period and time unit to fit your trading style—whether you’re focusing on longer-term trends or short-term price action.
Conclusion:
This indicator provides a dual-layer analysis by combining long-term and short-term perspectives, making it a versatile tool for identifying key highs and lows. Whether you are looking to confirm trend strength or spot potential breakouts, the “Long and Short Term Highs and Lows” indicator adds a valuable visual element to your TradingView charts.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Untuk akses cepat pada chart, tambahkan skrip ini ke favorit anda — pelajari lebih lanjut di sini.
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Untuk akses cepat pada chart, tambahkan skrip ini ke favorit anda — pelajari lebih lanjut di sini.
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.