Long and Short Term Highs and LowsLong and Short Term Highs and Lows
Overview:
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.
52weeklows
52 Week High/Low Tracking TableThis Indicator helps the User to Quickly view Current Closing Price Compared to the Mentioned Period High and Low.
"Bars Back" indicate the period you need to look back. In case of Daily charts 260 Bars Back usually indicate 52 Weeks/1 year. This is set a default. But you can change it as well.
The Indicator will show the data for below:-
1) High - Highest Close price for the Mentioned Period
2) % from High - The Percentage difference between the Current Close Price Vs Highest Close price for the Mentioned Period. (-) indicate that the current close price is lesser then then High Price.
3) Low - Lowest Close price for the Mentioned Period
4) % from Low - The Percentage difference between the Current Close Price Vs Highest Close price for the Mentioned Period. (-) indicate that the current close price is lesser then then High Price.
You can add this indicator to Quickly Scan multiple stocks to see were they stand.
Market Breadth: Trends & BreakoutsVisualize the percentage of stocks in an index participating in trends and breakouts/breakdowns.
The default data source is the S & P 500: the percent of stocks above/below the 200 and 50 day moving averages, and the percentage of stocks making new 52 week breakouts/breakdowns. You can pick new data sources in the settings.
The blue band represents the percentage of stocks above/below the 200 day moving average. (It's always 100% in width, unlike say Bollinger bands). The thin blue lines are the same but for the 50 day moving average. The red and green areas represent the percentage of stocks making new 52 week highs/lows.
In the example chart you can see a divergence between the market as a whole which continues up and to the right throughout 2021, where as fewer and fewer stocks were above their own 200 day moving average, causing the blue band to trend down. Before the market turns beginning 2022 you can see more stocks making new 52 week lows, even as other stocks make 52 week highs. After the market tops, the percentage of 52 week lows intensifies and the percentage of stocks below their 200 day moving average is already over 50%.
52 Weeks High/Low WidgetSome time ago I published my "All-Time High/Low Widget". I was asked to build and 52w weeks version.
So finally it's ready. It works pretty much the same way but uses a time period only of 52weeks.
You can also change the number of weeks in the parameters.
You can plot the levels and display some stats when 52W high/low happened and how far away are we at this moment.
Also, you can create alerts to get notified on 52W levels breakouts.
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
52/N Weeks High/LowPlots 52 Weeks historical high and low with respect to each bar.
Works on all timeframes - minute, days, weeks, months - and always plots 52 weeks historical high and low.
The 52 weeks lookback window slides backwards as we plot for older / historical bars on the chart.
Instead of 52 weeks, number of weeks to look back can be specified using 'No. of weeks to lookback' parameter in Settings --> Inputs.
Style and color for 'High' and 'Low' plots can be changed through Settings --> Style
MA 10,20,50,200Indicator consist of moving averages (MA).
This indicator make it easier for me to switch between few MA lines.
1. MA10
- used for intraday.
2. MA50 and Ichimoku
- to analyze swing trend
- display only MA50 and ichimoku cloud
3. MA20, MA50 and MA200
- to analyze the trend
- for swing trade
4. Lines 52 Week High / Low
- display both lines as guide when trading
X Period High/Low/MidToday we have a simple, but endlessly versatile, indicator that plots the X Period High/Low/Mid of your chosen market.
Traditionally the 52 week High/Low is used as a breakout signal. However, by changing to an X period, and adding a midway line, we create a more versatile indicator that can be tailored to various markets.
By default it's set at 250 periods (because I like the 250 period moving average), and I generally trade H4 and Daily time frames. But tweak it to your liking, you just have to modify the length periods by your desired time frame and lookback length. E.g. to create a 52 week indicator on the daily time frame, enter a length of 260 in the indicator (5 days per week * 52 weeks = 260).
For the above reason, I haven't made this indicator MTF, as there's no real need. However, if users find it easier I can look at adding it later.
Also, the mid point between an X period high/low is often a good trend-follower, as well as acting as support/resistance . I encourage you to experiment with different ways of using this indicator. Entire systems (if your risk management is correct) can be built and traded from this one indicator.
Good luck.
DD
52 Week High/Low to YesterdayThis script adds the 52 weeks (one year) high/low to the chart but it wouldn't update the value on the current trading day, so that it would remain at the same level for the whole trading day. It can come really handy for day trading the day of the 52 weeks high/low breakout/breakdown.