Mis à jour
XZ Session Core

Library "XZ_Session_Authority"
XZ Session Authority v1. Canonical suite-wide session-time authority for XZ indicators. Defines deterministic session standards, DST-aware IANA timezones, fixed session segments, custom-session reconstruction, occurrence keys and overlap masks. It deliberately contains no indicator-specific lifecycle, qualification, Supply/Demand, FVG, IL, market-structure or Research methodology.
sessionCount()
Number of canonical market-list session indexes used by XZ: Sydney, Tokyo, London, New York.
usesMarketList(standard)
True when the selected standard uses the canonical four-market session list.
Parameters:
standard (simple string)
standardCode(standard)
Short code for a session standard.
Parameters:
standard (simple string)
sessionName(standard, sessionIndex)
Full display name for one session index.
Parameters:
standard (simple string)
sessionIndex (int)
sessionCode(standard, sessionIndex)
Compact display code for one session index.
Parameters:
standard (simple string)
sessionIndex (int)
sessionTimezone(standard, sessionIndex, customTimezone, symbolTimezone)
Authoritative timezone for one session index.
Parameters:
standard (simple string)
sessionIndex (int)
customTimezone (simple string)
symbolTimezone (simple string)
isLocalWeekday(timestampValue, tz)
True when timestampValue is Monday-Friday in tz.
Parameters:
timestampValue (int)
tz (string)
occurrenceKey(timestampValue, tz)
Stable YYYYMMDD occurrence key in the supplied timezone.
Parameters:
timestampValue (int)
tz (string)
segmentCount(standard, sessionIndex)
Number of finite fixed segments for one market session occurrence. Tokyo Exchange Cash Hours uses two segments so the lunch break remains real.
Parameters:
standard (simple string)
sessionIndex (int)
segmentBounds(standard, sessionIndex, segmentIndex, timestampValue, customTimezone, symbolTimezone)
Market Centres and Exchange Cash Hours use fixed local schedules plus IANA timezone/DST authority. Consumers must not use this helper to infer exchange holidays or early closes on unrelated symbols.
Parameters:
standard (simple string)
sessionIndex (int)
segmentIndex (int)
timestampValue (int)
customTimezone (simple string)
symbolTimezone (simple string)
customSpec(openHHMM, closeHHMM, weekdaysOnly)
Reconstructs a Pine custom-session string from vertically stacked HHMM inputs.
Parameters:
openHHMM (simple string)
closeHHMM (simple string)
weekdaysOnly (simple bool)
sessionBit(sessionIndex)
Bit assigned to one canonical session index.
Parameters:
sessionIndex (int)
maskHas(sessionMask, sessionIndex)
Tests membership in the canonical four-session bit mask.
Parameters:
sessionMask (int)
sessionIndex (int)
maskAdd(sessionMask, sessionIndex)
Adds one canonical session index to a four-session bit mask.
Parameters:
sessionMask (int)
sessionIndex (int)
maskIntersection(firstMask, secondMask)
Intersection of two canonical session masks.
Parameters:
firstMask (int)
secondMask (int)
maskCount(sessionMask)
Number of active session bits in a mask.
Parameters:
sessionMask (int)
maskIsOverlap(sessionMask)
True when more than one canonical session is active in a mask.
Parameters:
sessionMask (int)
singleSessionIndex(sessionMask)
Returns the session index only when exactly one session bit is set; otherwise -1.
Parameters:
sessionMask (int)
maskCode(standard, sessionMask)
Compact human-readable code for a session mask.
Parameters:
standard (simple string)
sessionMask (int)
XZ Session Authority v1. Canonical suite-wide session-time authority for XZ indicators. Defines deterministic session standards, DST-aware IANA timezones, fixed session segments, custom-session reconstruction, occurrence keys and overlap masks. It deliberately contains no indicator-specific lifecycle, qualification, Supply/Demand, FVG, IL, market-structure or Research methodology.
sessionCount()
Number of canonical market-list session indexes used by XZ: Sydney, Tokyo, London, New York.
usesMarketList(standard)
True when the selected standard uses the canonical four-market session list.
Parameters:
standard (simple string)
standardCode(standard)
Short code for a session standard.
Parameters:
standard (simple string)
sessionName(standard, sessionIndex)
Full display name for one session index.
Parameters:
standard (simple string)
sessionIndex (int)
sessionCode(standard, sessionIndex)
Compact display code for one session index.
Parameters:
standard (simple string)
sessionIndex (int)
sessionTimezone(standard, sessionIndex, customTimezone, symbolTimezone)
Authoritative timezone for one session index.
Parameters:
standard (simple string)
sessionIndex (int)
customTimezone (simple string)
symbolTimezone (simple string)
isLocalWeekday(timestampValue, tz)
True when timestampValue is Monday-Friday in tz.
Parameters:
timestampValue (int)
tz (string)
occurrenceKey(timestampValue, tz)
Stable YYYYMMDD occurrence key in the supplied timezone.
Parameters:
timestampValue (int)
tz (string)
segmentCount(standard, sessionIndex)
Number of finite fixed segments for one market session occurrence. Tokyo Exchange Cash Hours uses two segments so the lunch break remains real.
Parameters:
standard (simple string)
sessionIndex (int)
segmentBounds(standard, sessionIndex, segmentIndex, timestampValue, customTimezone, symbolTimezone)
Market Centres and Exchange Cash Hours use fixed local schedules plus IANA timezone/DST authority. Consumers must not use this helper to infer exchange holidays or early closes on unrelated symbols.
Parameters:
standard (simple string)
sessionIndex (int)
segmentIndex (int)
timestampValue (int)
customTimezone (simple string)
symbolTimezone (simple string)
customSpec(openHHMM, closeHHMM, weekdaysOnly)
Reconstructs a Pine custom-session string from vertically stacked HHMM inputs.
Parameters:
openHHMM (simple string)
closeHHMM (simple string)
weekdaysOnly (simple bool)
sessionBit(sessionIndex)
Bit assigned to one canonical session index.
Parameters:
sessionIndex (int)
maskHas(sessionMask, sessionIndex)
Tests membership in the canonical four-session bit mask.
Parameters:
sessionMask (int)
sessionIndex (int)
maskAdd(sessionMask, sessionIndex)
Adds one canonical session index to a four-session bit mask.
Parameters:
sessionMask (int)
sessionIndex (int)
maskIntersection(firstMask, secondMask)
Intersection of two canonical session masks.
Parameters:
firstMask (int)
secondMask (int)
maskCount(sessionMask)
Number of active session bits in a mask.
Parameters:
sessionMask (int)
maskIsOverlap(sessionMask)
True when more than one canonical session is active in a mask.
Parameters:
sessionMask (int)
singleSessionIndex(sessionMask)
Returns the session index only when exactly one session bit is set; otherwise -1.
Parameters:
sessionMask (int)
maskCode(standard, sessionMask)
Compact human-readable code for a session mask.
Parameters:
standard (simple string)
sessionMask (int)
Notes de version
v2Added:
activeMaskAt(standard, timestampValue)
Resolves the canonical active-session mask at timestampValue for Market Centres (FX) or Exchange Cash Hours. Returns zero outside those market-list sessions, on local weekends, or for non-market-list standards. This is clock classification only and carries no indicator-specific analytical authority.
Parameters:
standard (simple string)
timestampValue (int)
Updated:
segmentBounds(standard, sessionIndex, segmentIndex, timestampValue, customTimezone, symbolTimezone)
Returns [openTime, closeTime, validWeekday, occurrenceKey] for a fixed market-list session segment containing the date of timestampValue. Market Centres and Exchange Cash Hours use fixed local schedules plus IANA timezone/DST authority. Consumers must not use this helper to infer exchange holidays or early closes on unrelated symbols.
Parameters:
standard (simple string)
sessionIndex (int)
segmentIndex (int)
timestampValue (int)
customTimezone (simple string)
symbolTimezone (simple string)
Notes de version
v3Added:
marketSelected(sessionIndex, showSydney, showTokyo, showLondon, showNewYork)
Returns whether one canonical session index is enabled by caller-supplied market selection toggles.
Parameters:
sessionIndex (int)
showSydney (bool)
showTokyo (bool)
showLondon (bool)
showNewYork (bool)
marketSelectionMask(showSydney, showTokyo, showLondon, showNewYork)
Packs caller-supplied Sydney/Tokyo/London/New York selection toggles into the canonical four-session mask.
Parameters:
showSydney (bool)
showTokyo (bool)
showLondon (bool)
showNewYork (bool)
marketSelectionCount(showSydney, showTokyo, showLondon, showNewYork)
Counts caller-selected canonical market sessions.
Parameters:
showSydney (bool)
showTokyo (bool)
showLondon (bool)
showNewYork (bool)
Notes de version
v4Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.