Last Year's Close [fmb]

This tool plots last year’s closing price as a clean stepline on the daily chart and turns it into a simple regime map. Each year is coloured by its own performance and the line flips in real time as price trades above or below that level.
- Plots last year’s close for each bar of the current year as a horizontal step line
- Works strictly on the 1D timeframe (the script will warn you otherwise)
- Year classification: if December closes above January’s open, that year is bullish; if it closes below, that year is bearish
- Horizontal and closing vertical segments are coloured green for bullish years and red for bearish years
- Inside the active year the colour updates dynamically: green while price is above last year’s close, red while price trades below it
- User inputs for bullish and bearish colours (default: soft green/red with 30 % opacity), so it can blend into any chart theme
- Uses the symbol’s own price scale, so the line always moves and scales together with the candles
Alert (New Feature)
The script includes a built-in alert condition that fires when price comes within a user-defined percentage of last year’s close.
Add the indicator to your chart (on 1D).
In Inputs, set the proximity percentage you want (default 10 %).
Create an alert on this script and choose:
- Condition: Price near last year's close
- Your preferred expiry and notification settings.
Use it to quickly see when a market is reclaiming or losing last year’s closing level, to anchor yearly mean-reversion trades, or to sanity-check how far a move has stretched relative to where the last calendar year finished.
- Plots last year’s close for each bar of the current year as a horizontal step line
- Works strictly on the 1D timeframe (the script will warn you otherwise)
- Year classification: if December closes above January’s open, that year is bullish; if it closes below, that year is bearish
- Horizontal and closing vertical segments are coloured green for bullish years and red for bearish years
- Inside the active year the colour updates dynamically: green while price is above last year’s close, red while price trades below it
- User inputs for bullish and bearish colours (default: soft green/red with 30 % opacity), so it can blend into any chart theme
- Uses the symbol’s own price scale, so the line always moves and scales together with the candles
Alert (New Feature)
The script includes a built-in alert condition that fires when price comes within a user-defined percentage of last year’s close.
Add the indicator to your chart (on 1D).
In Inputs, set the proximity percentage you want (default 10 %).
Create an alert on this script and choose:
- Condition: Price near last year's close
- Your preferred expiry and notification settings.
Use it to quickly see when a market is reclaiming or losing last year’s closing level, to anchor yearly mean-reversion trades, or to sanity-check how far a move has stretched relative to where the last calendar year finished.
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน