Indicator · Pine Script v6 · On the chart

Daily Seasonality

by piecioshka

Daily Seasonality colors the chart background according to the day of the week to highlight recurring weekly price patterns.

View on GitHub

GitHub stars2on the repository
Pine versionv6current
Lines of code78
Settings10inputs
LicenceMIT
Last update10 days ago18 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

78 lines of Pine Script v6 from indicators/seasonality/daily-seasonality/daily-seasonality.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

daily-seasonality.pine
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Piotr Kowalski "piecioshka"
// Docs (EN): https://github.com/piecioshka/tradingview-pine-scripts/blob/main/indicators/seasonality/daily-seasonality/daily-seasonality.md
// Docs (PL): https://github.com/piecioshka/tradingview-pine-scripts/blob/main/indicators/seasonality/daily-seasonality/daily-seasonality.pl.md

//@version=6
indicator('Daily Seasonality', overlay = true)

// Colors the chart background differently depending on the day of the week.
// Works best on intraday and daily charts - the recurring weekly pattern
// becomes visible (e.g. low volatility on Friday vs movement on Monday).
// Time zone: the exchange default (same as dayofweek() without a timezone argument).
// Colors: a rainbow across the week (Monday=red → Sunday=violet).

transp         = input.int(title='Transparency (0-100)', defval=80, minval=0, maxval=100, step=5)
showLegend     = input.bool(title='Show legend', defval=true)
legendPosition = input.string(title='Legend position', defval='Top right', options=['Top left', 'Top right', 'Bottom left', 'Bottom right'])

// Enable/disable individual days of the week.
// Useful e.g. for markets without a weekend - Saturday and Sunday can be turned off.
gDays = 'Days of the week'
useMon = input.bool(title='Monday',    defval=true, group=gDays)
useTue = input.bool(title='Tuesday',   defval=true, group=gDays)
useWed = input.bool(title='Wednesday', defval=true, group=gDays)
useThu = input.bool(title='Thursday',  defval=true, group=gDays)
useFri = input.bool(title='Friday',    defval=true, group=gDays)
useSat = input.bool(title='Saturday',  defval=true, group=gDays)
useSun = input.bool(title='Sunday',    defval=true, group=gDays)

// 7 colors - a rainbow across the week
colMon = color.rgb(230, 80, 80)    // Monday - red
colTue = color.rgb(240, 150, 60)   // Tuesday - orange
colWed = color.rgb(240, 215, 60)   // Wednesday - yellow
colThu = color.rgb(100, 200, 80)   // Thursday - green
colFri = color.rgb(70, 200, 200)   // Friday - turquoise
colSat = color.rgb(80, 130, 230)   // Saturday - blue
colSun = color.rgb(180, 90, 200)   // Sunday - violet

d = dayofweek(time)

bgCol = switch d
    dayofweek.monday    => useMon ? color.new(colMon, transp) : na
    dayofweek.tuesday   => useTue ? color.new(colTue, transp) : na
    dayofweek.wednesday => useWed ? color.new(colWed, transp) : na
    dayofweek.thursday  => useThu ? color.new(colThu, transp) : na
    dayofweek.friday    => useFri ? color.new(colFri, transp) : na
    dayofweek.saturday  => useSat ? color.new(colSat, transp) : na
    dayofweek.sunday    => useSun ? color.new(colSun, transp) : na
    => na

bgcolor(bgCol)

// Legend - a table showing which days have which color
if showLegend and barstate.islast
    pos = switch legendPosition
        'Top left'     => position.top_left
        'Top right'    => position.top_right
        'Bottom left'  => position.bottom_left
        'Bottom right' => position.bottom_right
        =>                position.top_right

    days    = array.from('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday')
    colors  = array.from(colMon, colTue, colWed, colThu, colFri, colSat, colSun)
    enabled = array.from(useMon, useTue, useWed, useThu, useFri, useSat, useSun)

    activeCount = 0
    for i = 0 to 6
        if array.get(enabled, i)
            activeCount += 1

    if activeCount > 0
        legend = table.new(position = pos, columns = 2, rows = activeCount, border_width = 1)
        row = 0
        for i = 0 to 6
            if array.get(enabled, i)
                table.cell(legend, 0, row, '    ', bgcolor = array.get(colors, i))
                table.cell(legend, 1, row, array.get(days, i), text_color = color.white, bgcolor = color.new(color.black, 30))
                row += 1

Overview

Daily Seasonality draws distinct rainbow color overlays directly on the main price chart for each day from Monday to Sunday. Users can adjust background color transparency, enable or disable specific days of the week for different market schedules, and toggle an on-screen legend table displaying active days.

Details

Published by

piecioshka on GitHub

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Sessions & time

Markets

Any symbol

Timeframes

M15-H1, H4 and above

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

pinescriptpinescript-indicatorspinescript-strategiestradingtradingview

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Transparency (0-100)int80transp
Show legendbooltrueshowLegend
Legend positionstringTop rightlegendPosition
MondaybooltrueuseMon
TuesdaybooltrueuseTue
WednesdaybooltrueuseWed
ThursdaybooltrueuseThu
FridaybooltrueuseFri
SaturdaybooltrueuseSat
SundaybooltrueuseSun
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

948 stars

This indicator counts down to a fixed Litecoin halving timestamp in August 2019, using Greenwich Mean Time. It subtracts the current time from that stamp and formats the remaining days, hours, minutes, and seconds. The day, hour, and minute of the target are u

Indicator v4 Sessions & time
Updated 10 days ago · GPL-3.0 GitHub repository of Litecoin Halving UTC Countdown
575 stars

This indicator builds Market Profile Time Price Opportunity (TPO) structures across defined session timeframes directly on the main price chart. It visualizes the Point of Control (POC) and Value Area boundaries using dynamic box drawings. An integrated multi-

Indicator v5 Support & resistanceScreeners & dashboards
Updated 1 year ago · MPL-2.0 GitHub repository of Market Profile with Screener

This indicator identifies and plots key options expiration dates on the price chart. It calculates monthly OpEx (the third Friday of each month), quarterly OpEx (March, June, September, December), and corresponding VIX expiration dates, drawing vertical lines

Indicator v6 Sessions & time
Updated 2 months ago · MIT GitHub repository of Expiration Highlights: Opex, Quarterly Opex & VIX with Vanna/Charm
257 stars

This indicator plots auto trade signals for E-mini S&P 500 futures on the price chart. It computes an EMA200 filter along with day ETH RTH session levels and percentage-based entry zones. Signals trigger CALL or PUT cases when price crosses defined thresholds

Indicator v6 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of Auto Trade Futures ES
219 stars

This indicator plots reference levels for previous daily high and low prices directly on the price chart. It requests daily timeframe data using the security function and plots the offset values as continuous lines, displaying resistance in red and support in

Indicator v4 Support & resistanceSessions & time
Updated 5 years ago · None stated GitHub repository of 昨日高低點標示

Golden Bullet Strategy

by TradersPost
218 stars

The Golden Bullet Strategy is an overlay signal indicator based on Smart Money Concepts and time-based liquidity models. It identifies liquidity sweeps of a designated reference session range during a specified hunt window. It then confirms Market Structure Sh

Indicator v6 SMC / ICT / price actionSessions & time
Updated 3 months ago · None stated GitHub repository of Golden Bullet Strategy

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers