PulseHub
OPEN-SOURCE SCRIPT
Updated

0000 Season Quarter Month 48xHORIZ v2.29

431
Overview
The "Season Quarter Month 48xHORIZ v2.29" script is an advanced, seasonality-based backtesting indicator and dashboard designed for PulseWire. It strictly requires a Daily timeframe and analyzes historical price action by slicing the trading year into 48 "Quarter-Months" (roughly 7-day increments) or 24 "Half-Months."

Core Mechanics & Scoring
Seasonal Scoring System: For every segment of the year, the script calculates a proprietary "Score." This score rewards periods with high average returns and a high percentage of positive historical outcomes (win rate), while penalizing volatility (standard deviation).

Risk Aversion: A customizable RiskAversion input acts as an exponent to punish highly volatile periods—the higher the value, the safer the seasonal period must be to trigger a trade.

Time Shifting: An offset feature (offsetDays) allows the user to shift the start of a "seasonal month" forward or backward by a few days to anticipate seasonal trends earlier.

Trend Filter: An optional Exponential Moving Average (EMA) filter ensures that new seasonal buy signals are only executed if the asset is in an active macro uptrend.

Simulation & Backtesting
"Glaskugel" (Crystal Ball) Mode: This is an in-sample simulation that uses the entirety of the loaded historical data to generate an equity curve. By acting with "hindsight," it shows the theoretical maximum performance of the seasonal pattern.

Performance Tracking: The script simulates a trading strategy (buying when the seasonal score exceeds a threshold) and compares it against a Buy & Hold (B&H) baseline. It calculates metrics like Compound Annual Growth Rate (CAGR), Maximum Drawdown (Max DD), Win Rate, and Profit Factor.

Equity Polyline: It visually plots the simulated portfolio's growth directly on the chart using colored polylines.

UI & Dashboards
Stats Table: Displays high-level strategy performance, Buy & Hold comparisons, the asset's Market Cap, the distance from the EMA, and exactly when the next seasonal phase shift will occur.

H1 & H2 Seasonality Heatmaps: Two massive, highly detailed tables showing the historical performance of the First Half (H1) and Second Half (H2) of the year. They break down average returns, win rates, and scores for every Quarter-Month, Half-Month, Month, and Quarter, complete with historical year-by-year data.

Debug Table: A diagnostic tool that isolates a user-defined "Debug Year" and prints a t-log of every simulated trade (Entry Date, Exit Date, and Return) to verify the strategy's logic.
Release Notes
BugFix in Performance-Curve
Release Notes
YTD, CurrentDD in StatTab
Release Notes
// v2.44 Updates:
// - Changed header logic: Now dynamically calculates and displays the exact last day of the CURRENT Month-Quarter (MQ).
//
// v2.42 Updates:
// - Removed the rogue "Scale Anchor" plot that accidentally returned in v2.41, permanently killing the blue circles again.
Release Notes
v2.45 Updates:
// - Darkened all surface and background colors (Hex & color.new transparencies) for a deeper, less intrusive look.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.