Futures Sessions with NY Opening Range, Levels, FVGs, & HolidaysThis is a session-anchored intraday framework for futures. Every element on the chart is derived from the same session definitions, so the tools stay consistent with each other: the sessions paint the ranges, the completed ranges leave behind levels, the level lifecycle is tied to the session clock, the NY Opening Range anchors the morning, fair value gaps give context inside the ranges, and holiday markers explain the days when sessions are missing or shortened.
Session Ranges
Each market session is defined using IANA names (America/New_York, Asia/Tokyo) – never fixed UTC offsets. The indicator renders identically no matter what timezone your chart is set to (Exchange, New York, etc). Daylight saving is handled automatically: New York flips between EST and EDT on its own, and Tokyo has no DST, so its position against the New York clock simply shifts with the US clock changes (Tokyo's 9:00 open lands at 20:00 New York in summer, 19:00 in winter).
Each session is a shaded fill: Asia in red, London in yellow, New York in blue as defaults.
NY Pre-Open: a dotted range tracks the morning trade from the ORB open at 8:00 America/New_York until the session fill starts at 9:30. It is derived from the ORB input, so moving the ORB moves it too.
Globex Open: the CME futures trading day opens at 18:00 America/New_York (17:00 Chicago), indicated by the pre-open dotted range before the session fill starts at Tokyo open when volume comes in.
New York Opening Range (ORB)
The ORB captures the range of the America/New_York 8:00–8:15 candle, shown as a box with a dashed midline in maroon. It is visible on all smaller timeframes and up to 1h. The ORB ends on the last candle of the New York session — the end time is derived from the NY session input, so the two can never drift apart.
If the ORB range is oversized (18 or more points, configurable), the box is flagged with a red "ORB INVALID" label and shows the range in points.
Sessions Levels (Untested Highs and Lows)
When a session completes, its final highs (black) and lows (teal) are drawn from the candle and extend to the right indefinitely until a level is tested on its first touch. You can configure whether a test means a wick touch (ICT/liquidity style, the default) or a candle close beyond the level (support/resistance style).
Tested levels stay on the chart until the session running at the time of the test ends, so you can use them as points of reference until then. During the London/NY overlap, New York counts as the running session. A level tested during a session gap survives the gap and is handed to the next session that opens. At the NY ORB open at 8:00, all tested levels are removed to prevent clutter.
Untested levels never expire. You can toggle the prices on the price scale on or off based on preference.
Fair Value Gaps
Classic three-candle imbalances in both directions: bullish when a candle's low is above the high from two candles back, bearish when a candle's high is below the low from two candles back. Gaps are shaded in green (by default, configurable) from the middle candle and extend to the right until price trades fully through it (bullish: a low at or below the gap bottom; bearish: a high at or above the gap top), then it is removed. Each gap can draw its Consequent Encroachment — a dashed line at the 50% of the gap, the level where a gap is commonly considered mitigated. Inputs: fill color, CE toggle and color, minimum gap size in points (useful on low timeframes), and a cap on how many gaps are kept.
Holiday Markers
US (NYSE) holidays: a dotted vertical line and a Statue of Liberty marker anchored to the ORB's first candle. Detection is fully rule-based — weekday-observance rules for every holiday, and Good Friday computed from the Easter algorithm (Butcher's computus), so nothing is hardcoded and no yearly maintenance is needed.
Note: NYSE does not observe New Year's on the prior Friday when January 1 falls on a Saturday, and holidays observed on a Friday/Monday (like July 4 on a weekend) are marked on the actual closure day.
Japanese holidays: a dotted vertical line and a shrine marker anchored to the Tokyo session's first candle. Covers the fixed-date holidays, the Happy Monday holidays, both equinox holidays (astronomical formulas, valid through 2150), Monday substitute holidays, the occasional Silver Week citizens' holiday, and the TSE year-end closures (Dec 31, Jan 2, Jan 3).
Markers sit at the bottom of the pane. Days when CME is fully closed have no bars, so there is nothing to mark — markers appear on holidays with shortened or normal trading.
Alert
One built-in alert condition: Tokyo Range Break — fires when price closes outside the completed Tokyo session range, active from the Tokyo close until 11:30 New York time.
How to Use
Built for intraday charts of 1h and below (it draws nothing on higher timeframes). The ORB needs a 15-minute chart or lower to line up with whole candles. Defaults are tuned for CME index futures (ES/MES); the session inputs work on any symbol with continuous futures-style hours. Old drawings persist until Pine's 500-object limits trim the oldest.
These tools are combined because each one feeds the next: the sessions define the ranges, the completed ranges produce the levels, the level lifecycle runs on the session clock and the ORB open, the pre-open dotted ranges share the same derived timings, and the holiday markers explain the days when the rest of the framework is dark. Changing one session input moves everything that depends on it, consistently. Indicator

Holidays v1
1. Overview
Holidays — marks trading halts at the world's major stock exchanges directly on the PulseWire chart. For each configured holiday, a colored background block spans the full calendar day. At the bottom of the chart, auto-sizing labels display the holiday name and the flag emojis of all affected exchanges.
At a glance, you can see whether one or more markets are closed on any given day — critical information for assessing liquidity conditions, spread behavior, and correlation reliability across instruments.
Key Features
8 pre-configured exchanges with verified 2026 holiday data
10 freely assignable custom slots for user-defined holidays or events
Every holiday individually toggleable — enable only what you need
Per-exchange color and configurable session duration (default: full 24h calendar day)
Smart label merging: when multiple exchanges share the same holiday on the same day (e.g. New Year's Day), a single label shows the holiday name with all country flags combined
Labels at chart bottom with automatic round-robin stacking across 4 rows — no overlap, no text truncation
Info table showing active and upcoming holidays, color-coded by exchange, with flag and date columns
Three independent visibility toggles: background blocks, labels, and info table can each be shown or hidden separately
Works for past AND future dates (box.new with xloc.bar_time)
Visible chart range detection: label positions recalculate automatically when scrolling or zooming
2. Smart Label Merging & Stacking
Many major holidays — such as New Year's Day, Good Friday, or Christmas — are observed simultaneously by multiple exchanges. Without merging, these would produce 5-8 overlapping labels on the same day.
How Merging Works
The indicator groups all holidays by date AND name. When multiple exchanges have the same holiday on the same day, they are merged into a single label:
Line 1: Holiday name (e.g. 'New Year's Day')
Line 2: Combined flag emojis of all affected exchanges (e.g. '🇺🇸 🇬🇧 🇨🇦 🇩🇪 🇯🇵 🇨🇳 🇦🇺 🇰🇷')
Different holidays on the same day (e.g. JP Greenery Day and KR Children's Day on May 4/5) remain as separate labels and are stacked vertically.
Round-Robin Row Stacking
Labels are distributed across 4 rows at the bottom of the chart using a round-robin pattern: label 1 goes to row 1, label 2 to row 2, label 3 to row 3, label 4 to row 4, label 5 back to row 1, and so on. This guarantees that no two adjacent labels share the same vertical position, regardless of how closely spaced the holidays are in time.
The vertical spacing between rows scales automatically with the visible price range — when you zoom in, rows spread further apart; when you zoom out, they compress proportionally.
3. Supported Exchanges
The indicator includes pre-filled and verified holiday data for eight exchanges. Each exchange group has its own color, a master enable toggle, and a configurable session duration (default: 24 hours = full calendar day).
Holidays (Configurable session duration)
Default: full calendar day (24h)
🇺🇸
USA — NYSE / NASDAQ
Holidays: 9
🇬🇧
London — LSE
Holidays: 8
🇨🇦
Canada — TSX
Holidays: 8
🇩🇪
Germany — Xetra
Holidays: 7
🇯🇵
Japan — TSE
Holidays: 8
🇨🇳
China — SSE
Holidays: 7
🇦🇺
Australia — ASX
Holidays: 8
🇰🇷
South Korea — KRX
Holidays: 7
★
Custom (10 slots)
Freely configurable
4. Settings
All settings are accessible via the gear icon next to the indicator name in the chart legend, or by right-clicking the indicator and selecting 'Settings'.
4.1 Style Settings
Background Opacity
Transparency of the background blocks. 0 = fully opaque, 100 = invisible. Default: 85.
Border Color
Color of the outline drawn around each holiday block.
Border Style
Line style of the outline: Solid, Dashed, Dotted, or None.
Border Width (px)
Thickness of the outline in pixels (0–4).
Show Background Blocks
Toggle the full-height colored background blocks on/off. Can be disabled while keeping labels and/or table visible.
Show Block Labels
Toggle the holiday name labels at the bottom of the chart on/off.
Label Font Size
Font size for labels: Tiny, Small, Normal, Large.
Label Text Color
Text color of the bottom labels.
Label Background Transparency
Transparency of the label background. Uses the exchange color. 0 = opaque, 100 = invisible.
Show Info Table
Toggle the info table on/off. Works independently of blocks and labels.
Table Position
Corner of the chart: Top Right, Top Left, Bottom Right, Bottom Left.
Table: max upcoming rows
Maximum number of upcoming holidays in the table. Active holidays always shown additionally.
Table Font Size
Font size: Tiny, Small, Normal, Large.
Table Border Color
Grid line and frame color of the table.
Table Background Color
Background color of the table frame.
Table Upcoming Row Transparency
Transparency of upcoming (not yet active) holiday rows. Active rows always at 30%.
4.2 Per-Exchange Settings
Each of the eight exchanges has its own settings group:
✓ Enable Group: Enable or disable all holidays for this exchange.
Color: Color used for background blocks, labels, and table rows.
Session hours: Duration of the holiday highlight (default: 24h = full calendar day). Can be reduced to show only the actual trading session if desired.
Below these, each individual holiday has a checkbox (enable/disable) and a date/time input.
4.3 Custom Holidays
The '▼ Custom Holidays' group provides 10 free slots. Each slot has a checkbox, a name field, and a start timestamp. Custom slots share a common session duration setting.
5. The Info Table
The info table displays active and upcoming holidays in a compact, color-coded format.
Table Structure
Column 1 (Flag): Country flag emoji or ★ for custom holidays
Column 2 (Holiday): Holiday name with exchange prefix (e.g. 'GB Early May BH')
Column 3 (Date): Date in UTC (format: MMM dd)
Display Logic
Active holidays: strong exchange color, white text
Upcoming holidays (within 90 days): dimmed exchange color at configurable transparency
Maximum N upcoming entries shown (configurable), active holidays always additional
Entries sorted chronologically by date
6. Three Independent Visibility Toggles
The indicator provides three separate toggles in the Style Settings, allowing you to show exactly what you need:
Toggle & What it controls:
Show Background Blocks
Full-height colored blocks spanning the entire price range. Provides an immediate visual cue that a holiday is in effect.
Show Block Labels
Auto-sizing labels at the chart bottom showing the holiday name and country flags. Labels use round-robin row stacking to prevent overlap.
Show Info Table
Compact table listing active and upcoming holidays. Can serve as the sole holiday indicator when blocks and labels are disabled.
Example combinations: table-only mode for a clean chart with minimal visual clutter; blocks-only for quick visual scanning without text; all three enabled for maximum information density.
7. Technical Notes
7.1 Visible Range Detection
The indicator tracks the visible price range using chart.left_visible_bar_time, which triggers a recalculation whenever the user scrolls or zooms. The lowest and highest visible prices are computed incrementally using var float variables — no ta.lowest or ta.highest with series length, avoiding Pine's historical buffer allocation issues entirely.
7.2 Past and Future Display
Holiday blocks use box.new() with xloc=xloc.bar_time, which is not limited to historical bars. Holidays are rendered correctly for future dates as soon as the corresponding time range is visible on the chart axis.
7.3 Performance and Limits
Up to 500 boxes and 500 labels (configurable via indicator declaration)
All drawing objects redrawn only on barstate.islast — no performance impact on historical bars
Holiday data stored in global arrays to stay within Pine v6's 254-element-per-function limit
8.4 Holiday Data
All pre-filled dates refer to 2026 and have been verified against official exchange calendars from NYSE/ICE, LSE, TSX, Xetra/Deutsche Börse, JPX, SSE, ASX, and KRX. All timestamps are set to 00:00 UTC with a default duration of 24 hours, marking the full calendar day. For subsequent years, dates must be updated manually.
8. Use Cases
Liquidity Analysis
On days when multiple exchanges are simultaneously closed — Good Friday affects NYSE, LSE, TSX, Xetra, and ASX — the merged label shows all five flags at once, and the overlapping background blocks create a visually darker zone. This signals exceptionally thin market liquidity.
Forward Planning
The info table lists upcoming holidays chronologically. Traders can identify well in advance when reduced activity is expected — useful for position sizing, stop placement, and avoiding entries before liquidity gaps.
Custom Event Marking
The 10 custom slots can mark FOMC meetings, ECB rate decisions, NFP releases, or any other scheduled events using the same visual system.
If you have questions just contact me or put your ideas or wishes in the comments. Indicator

Market Impact Calendar📌 Monthly economic-impact calendar with daily scoring, trading-session weighting, DST schedules, and a synthetic market bulletin.
▌WHY THIS INDICATOR IS USEFUL
Market Impact Calendar was designed for a simple purpose: not just to display economic releases, but to help estimate their potential weight on a trading day.
Instead of a simple news list, the indicator provides a more structured reading:
- a monthly calendar directly on the chart,
- a daily impact score,
- weighting based on your own trading sessions,
- integration of special US market days,
- daylight saving time (DST) schedule information,
- and a bulletin mode to summarize the selected day quickly.
The goal is not to predict the market, but to provide a visual decision-support tool helping traders identify whether a day looks calm, moderate, or sensitive.
▌CREDITS & TECHNICAL BASE
This indicator uses the public Pine libraries “forex_factory_decoding” and “forex_factory_utility” from the original open-source work by toodegrees, based on Forex Factory data handling.
The main script, calendar logic, scoring system, interface, bulletin logic, trading-session weighting, special US day handling, and DST integration were developed in this version by E2PZ Continuum.
▌WHAT THIS INDICATOR DOES
The indicator processes economic releases through the imported libraries, then reorganizes them into a market-impact-oriented structure:
- classification of releases by time segment,
- grouping by day,
- filtering by impact level,
- weighting based on the related currency,
- weighting based on your trading hours,
- optional bonuses for major event types,
- final synthesis into a daily score and visual calendar display.
Each calendar day is therefore simplified into an operational reading:
- green = generally light day,
- orange = moderately sensitive day,
- red = potentially heavier or riskier day.
▌WHAT MAKES THIS VERSION ORIGINAL
This indicator is not a simple repackaging of raw economic data.
Its added value comes from:
- a full monthly calendar view directly displayed on the chart,
- a trading-oriented daily impact score,
- custom weighting through up to three trading-session levels,
- integration of US holidays, special days, and partial closes,
- DST information displayed in tooltips,
- manual navigation by day / month / year,
- a “Bulletin” mode turning the selected day into a readable editorial summary,
- bilingual English / French interface support,
- and a user-oriented reading logic designed to help decision-making rather than simply listing releases.
▌HOW TO USE IT
1. Choose whether to display the calendar, the bulletin, or both.
2. Select your timezone.
3. Configure your primary, secondary, and tertiary trading sessions.
4. Select which news impact levels should be included.
5. Navigate through the month or manually select a specific day.
6. Use Bulletin mode if you want a more narrative summary of the selected day.
Quick reading:
- a colored cell gives a visual estimate of the day’s sensitivity,
- the cell tooltip details time windows, related currencies, and major events,
- the information bar or bulletin summarizes the selected day.
▌MAIN SETTINGS
CALENDAR / BULLETIN
Displays the monthly calendar, the editorial bulletin, or both at the same time.
TIMEZONE
Converts displayed times into the selected timezone.
TRADING HOURS
Lets you define up to three personal trading windows.
Releases occurring inside these windows do not receive the same weight in the daily score.
NEWS FILTER
Selects which impact levels are used in the calculation and display.
SELECTION
Lets you manually browse a specific day, month, or year.
LANGUAGE
Switches between English and French display.
ADDITIONAL MARKETS (DST)
Adds optional markets to the schedule information shown during clock changes.
▌HOW THE SCORE SHOULD BE INTERPRETED
The daily score is a synthetic estimate.
It is not an absolute truth about future volatility.
It combines multiple elements:
- release importance,
- related currency,
- release timing,
- proximity to your trading sessions,
- clustering of multiple releases on the same day,
- and the context of special US market days.
This means that a red day does not guarantee strong volatility, and a green day does not guarantee a quiet market.
▌WARNINGS & LIMITATIONS
This indicator depends on an external source related to economic releases.
Like any third-party source, it may occasionally be delayed, incomplete, or partially updated.
The displayed score remains an internal estimate.
It helps rank days, but it does not replace personal analysis or manual verification of important releases.
Some future dates may remain neutral until the source has published the corresponding weekly data.
This indicator is designed as a preparation and decision-support tool, not as an automatic entry or exit signal.
▌USE CASES
This indicator can be useful to:
- avoid trading blind on sensitive macro days,
- quickly identify high-density economic days,
- adjust vigilance according to your trading session,
- prepare your week or your session in advance,
- filter days that look calmer or more sensitive.
▌SUMMARY
Market Impact Calendar aims to transform a raw flow of economic releases into a structured, visual, and operational reading for traders.
The goal is not just to see the news.
The goal is to better understand when a day deserves more attention — and why. Indicator

XAUMO TIMING DashboardXAUMO Timing Dashboard
Open-source UTC timing dashboard for traders who want better awareness of bar timing, session timing, overlap windows, holidays, and major USD event timing directly on the chart.
This indicator was built around a practical idea:
many traders watch price very closely, but they do not always watch time with the same discipline.
A setup can look good technically, but timing still matters:
- the bar may be seconds away from closing
- the 4H candle may be about to roll
- London may be close to ending
- New York may be opening
- a session overlap may be starting
- a major USD event may be near
This script helps bring that time awareness onto the chart in one compact dashboard.
WHAT THE INDICATOR DOES
XAUMO Timing Dashboard displays:
- current bar countdown
- higher-timeframe countdown
- official session countdown
- pre-market countdown
- after-market countdown
- major session countdowns
- overlap countdowns
- holiday awareness
- next major hard-coded USD event timer
- visual controls for text size, text color, background colors, and visibility toggles
Everything is displayed in UTC to keep the workflow consistent across symbols, brokers, and locations.
WHY IT CAN BE USEFUL
This tool is designed for traders who want to reduce timing mistakes.
It can help answer questions like:
- How much time is left before this candle closes?
- How close is the 4H close?
- Is London still active?
- Is the London / New York overlap running?
- Is a holiday affecting market participation?
- Is a major USD event getting close?
It does not predict market direction.
It improves timing awareness.
WHO IT MAY HELP
This indicator may be useful for:
- intraday traders
- scalpers
- session traders
- gold traders
- FX traders
- CFD traders
- traders who work with UTC-based timing models
- traders who want session and macro timing visible on-chart
HOW IT IS CODED
The script is written in Pine Script and uses an on-chart dashboard table.
The logic includes:
- countdown calculations from the current bar and a selected higher timeframe
- configurable UTC windows for official, pre-market, and after-market phases
- session state detection for major trading sessions
- overlap detection between major sessions
- hard-coded holiday packs
- hard-coded USD tier-1 event timestamps
- user controls for visibility and styling so the board can stay minimal or detailed depending on preference
The goal is practical chart awareness, not signal generation.
IMPORTANT NOTES
- This is a timing and awareness tool, not a buy/sell signal tool.
- It does not replace your own execution model, risk management, or market analysis.
- Session definitions can vary by broker and symbol, so official / pre-market / after-market windows are user-editable.
- Holiday and economic-event data in this version are hard-coded and should be reviewed and refreshed over time.
- Always confirm major event timing with your own trusted calendar before live trading.
OPEN-SOURCE AND COLLABORATION
This script is published open-source so traders and coders can inspect the logic, learn from it, and adapt it to their own workflow.
Constructive collaboration, improvement ideas, and responsible open-source contributions are very welcome.
If you build on this script or reuse any part of it in a publication, please respect PulseWire House Rules and provide proper credit where required.
FINAL THOUGHT
Charts show price.
XAUMO Timing Dashboard helps show timing.
For traders who care about candle close, higher-timeframe rollovers, session transitions, overlaps, holidays, and macro-event awareness, this tool is designed to make time more visible on the chart. Indicator

Santa's Adventure [AlgoAlpha]Introducing "Santa's Adventure," a unique and festive PulseWire indicator designed to bring the holiday spirit to your trading charts. With this indicator, watch as Santa, his sleigh, Rudolf the reindeer, and a flurry of snowflakes come to life, creating a cheerful visual experience while you monitor the markets.
Key Features:
🎁 Dynamic Santa Sleigh Visualization : Santa's sleigh, Rudolf, and holiday presents adapt to price movements and chart structure.
🎨 Customizable Holiday Colors : Adjust colors for Santa’s outfit, Rudolf’s nose, sleigh, presents, and more.
❄️ Realistic Snow Animation : A cascade of snowflakes decorates your charts, with density and range adjustable to suit your preferences.
📏 Adaptive Scaling : All visuals scale based on price volatility and market dynamics.
🔄 Rotation by Trend : Santa and his entourage tilt to reflect market trends, making it both functional and fun!
How to Use :
Add the Indicator to Your Chart : Search for "Santa's Adventure" in the PulseWire indicator library and add it to your favorites. Use the input menu to adjust snow density, sleigh colors, and other festive elements to match your trading style or holiday mood.
Observe the Market : Watch Santa’s sleigh glide across the chart while Rudolf leads the way, with snowflakes gently falling to enhance the visual charm.
How It Works :
The indicator uses price volatility and market data to dynamically position Santa, his sleigh, Rudolf, and presents on the chart. Santa's Sleigh angle adjusts based on price trends, reflecting market direction. Santa's sleigh and the snowstorm are plotted using advanced polyline arrays for a smooth and interactive display. A festive algorithm powers the snowfall animation, ensuring a consistent and immersive holiday atmosphere. The visuals are built to adapt seamlessly to any market environment, combining holiday cheer with market insights.
Add "Santa's Adventure" to your PulseWire charts today and bring the holiday spirit to your trading journey, Merry Christmas! 🎅🎄 Indicator

HolidayLibrary "Holiday"
- Full Control over Holidays and Daylight Savings Time (DLS)
The Holiday Library is an essential tool for traders and analysts who engage in backtesting and live trading . This comprehensive library enables the incorporation of crucial calendar elements - specifically Daylight Savings Time (DLS) adjustments and public holidays - into trading strategies and backtesting environments.
Key Features:
- DLS Adjustments: The library takes into account the shifts in time due to Daylight Savings. This feature is particularly vital for backtesting strategies, as DLS can impact trading hours, which in turn affects the volatility and liquidity in the market. Accurate DLS adjustments ensure that backtesting scenarios are as close to real-life conditions as possible.
- Comprehensive Holiday Metadata: The library includes a rich set of holiday metadata, allowing for the detailed scheduling of trading activities around public holidays. This feature is crucial for avoiding skewed results in backtesting, where holiday trading sessions might differ significantly in terms of volume and price movement.
- Customizable Holiday Schedules: Users can add or remove specific holidays, tailoring the library to fit various regional market schedules or specific trading requirements.
- Visualization Aids: The library supports on-chart labels, making it visually intuitive to identify holidays and DLS shifts directly on trading charts.
Use Cases:
1. Strategy Development: When developing trading strategies, it’s important to account for non-trading days and altered trading hours due to holidays and DLS. This library enables a realistic and accurate representation of these factors.
2. Risk Management: Trading around holidays can be riskier due to thinner liquidity and greater volatility. By integrating holiday data, traders can better manage their risk exposure.
3. Backtesting Accuracy: For backtesting to be effective, it must simulate the actual market conditions as closely as possible. Incorporating holidays and DLS adjustments contributes to more reliable and realistic backtesting results.
4. Global Trading: For traders active in multiple global markets, this library provides an easy way to handle different holiday schedules and DLS shifts across regions.
The Holiday Library is a versatile tool that enhances the precision and realism of trading simulations and strategy development . Its integration into the trading workflow is straightforward and beneficial for both novice and experienced traders.
EasterAlgo(_year)
Calculates the date of Easter Sunday for a given year using the Anonymous Gregorian algorithm.
`Gauss Algorithm for Easter Sunday` was developed by the mathematician Carl Friedrich Gauss
This algorithm is based on the cycles of the moon and the fact that Easter always falls on the first Sunday after the first ecclesiastical full moon that occurs on or after March 21.
While it's not considered to be 100% accurate due to rare exceptions, it does give the correct date in most cases.
It's important to note that Gauss's formula has been found to be inaccurate for some 21st-century years in the Gregorian calendar. Specifically, the next suggested failure years are 2038, 2051.
This function can be used for Good Friday (Friday before Easter), Easter Sunday, and Easter Monday (following Monday).
en.wikipedia.org
Parameters:
_year (int) : `int` - The year for which to calculate the date of Easter Sunday. This should be a four-digit year (YYYY).
Returns: tuple - The month (1-12) and day (1-31) of Easter Sunday for the given year.
easterInit()
Inits the date of Easter Sunday and Good Friday for a given year.
Returns: tuple - The month (1-12) and day (1-31) of Easter Sunday and Good Friday for the given year.
isLeapYear(_year)
Determine if a year is a leap year.
Parameters:
_year (int) : `int` - 4 digit year to check => YYYY
Returns: `bool` - true if input year is a leap year
method timezoneHelper(utc)
Helper function to convert UTC time.
Namespace types: series int, simple int, input int, const int
Parameters:
utc (int) : `int` - UTC time shift in hours.
Returns: `string`- UTC time string with shift applied.
weekofmonth()
Function to find the week of the month of a given Unix Time.
Returns: number - The week of the month of the specified UTC time.
dayLightSavingsAdjustedUTC(utc, adjustForDLS)
dayLightSavingsAdjustedUTC
Parameters:
utc (int) : `int` - The normal UTC timestamp to be used for reference.
adjustForDLS (bool) : `bool` - Flag indicating whether to adjust for daylight savings time (DLS).
Returns: `int` - The adjusted UTC timestamp for the given normal UTC timestamp.
getDayOfYear(monthOfYear, dayOfMonth, weekOfMonth, dayOfWeek, lastOccurrenceInMonth, holiday)
Function gets the day of the year of a given holiday (1-366)
Parameters:
monthOfYear (int)
dayOfMonth (int)
weekOfMonth (int)
dayOfWeek (int)
lastOccurrenceInMonth (bool)
holiday (string)
Returns: `int` - The day of the year of the holiday 1-366.
method buildMap(holidayMap, holiday, monthOfYear, weekOfMonth, dayOfWeek, dayOfMonth, lastOccurrenceInMonth, closingTime)
Function to build the `holidaysMap`.
Namespace types: map
Parameters:
holidayMap (map) : `map` - The map of holidays.
holiday (string) : `string` - The name of the holiday.
monthOfYear (int) : `int` - The month of the year of the holiday.
weekOfMonth (int) : `int` - The week of the month of the holiday.
dayOfWeek (int) : `int` - The day of the week of the holiday.
dayOfMonth (int) : `int` - The day of the month of the holiday.
lastOccurrenceInMonth (bool) : `bool` - Flag indicating whether the holiday is the last occurrence of the day in the month.
closingTime (int) : `int` - The closing time of the holiday.
Returns: `map` - The updated map of holidays
holidayInit(addHolidaysArray, removeHolidaysArray, defaultHolidays)
Initializes a HolidayStorage object with predefined US holidays.
Parameters:
addHolidaysArray (array) : `array` - The array of additional holidays to be added.
removeHolidaysArray (array) : `array` - The array of holidays to be removed.
defaultHolidays (bool) : `bool` - Flag indicating whether to include the default holidays.
Returns: `map` - The map of holidays.
Holidays(utc, addHolidaysArray, removeHolidaysArray, adjustForDLS, displayLabel, defaultHolidays)
Main function to build the holidays object, this is the only function from this library that should be needed. \
all functionality should be available through this function. \
With the exception of initializing a `HolidayMetaData` object to add a holiday or early close. \
\
**Default Holidays:** \
`DLS begin`, `DLS end`, `New Year's Day`, `MLK Jr. Day`, \
`Washington Day`, `Memorial Day`, `Independence Day`, `Labor Day`, \
`Columbus Day`, `Veterans Day`, `Thanksgiving Day`, `Christmas Day` \
\
**Example**
```
HolidayMetaData valentinesDay = HolidayMetaData.new(holiday="Valentine's Day", monthOfYear=2, dayOfMonth=14)
HolidayMetaData stPatricksDay = HolidayMetaData.new(holiday="St. Patrick's Day", monthOfYear=3, dayOfMonth=17)
HolidayMetaData addHolidaysArray = array.from(valentinesDay, stPatricksDay)
string removeHolidaysArray = array.from("DLS begin", "DLS end")
܂Holidays = Holidays(
܂ utc=-6,
܂ addHolidaysArray=addHolidaysArray,
܂ removeHolidaysArray=removeHolidaysArray,
܂ adjustForDLS=true,
܂ displayLabel=true,
܂ defaultHolidays=true,
܂ )
plot(Holidays.newHoliday ? open : na, title="newHoliday", color=color.red, linewidth=4, style=plot.style_circles)
```
Parameters:
utc (int) : `int` - The UTC time shift in hours
addHolidaysArray (array) : `array` - The array of additional holidays to be added
removeHolidaysArray (array) : `array` - The array of holidays to be removed
adjustForDLS (bool) : `bool` - Flag indicating whether to adjust for daylight savings time (DLS)
displayLabel (bool) : `bool` - Flag indicating whether to display a label on the chart
defaultHolidays (bool) : `bool` - Flag indicating whether to include the default holidays
Returns: `HolidayObject` - The holidays object | Holidays = (holidaysMap: map, newHoliday: bool, holiday: string, dayString: string)
HolidayMetaData
HolidayMetaData
Fields:
holiday (series string) : `string` - The name of the holiday.
dayOfYear (series int) : `int` - The day of the year of the holiday.
monthOfYear (series int) : `int` - The month of the year of the holiday.
dayOfMonth (series int) : `int` - The day of the month of the holiday.
weekOfMonth (series int) : `int` - The week of the month of the holiday.
dayOfWeek (series int) : `int` - The day of the week of the holiday.
lastOccurrenceInMonth (series bool)
closingTime (series int) : `int` - The closing time of the holiday.
utc (series int) : `int` - The UTC time shift in hours.
HolidayObject
HolidayObject
Fields:
holidaysMap (map) : `map` - The map of holidays.
newHoliday (series bool) : `bool` - Flag indicating whether today is a new holiday.
activeHoliday (series bool) : `bool` - Flag indicating whether today is an active holiday.
holiday (series string) : `string` - The name of the holiday.
dayString (series string) : `string` - The day of the week of the holiday. Library

Library

Library

Library

Library

Library

Library

Library

Library

Library

Library

Library

Indicator
