PROTECTED SOURCE SCRIPT

Crypto 4Y Cycle (Weekly-anchored) [Brent]

60
Crypto 4Y Cycle(Weekly-Anchored)
================================================================
Bull market: 152 weeks

Bear market: 52 weeks

Total: 204 weeks (≈ 1,428 days)

No matter whether your chart is set to 1D / 4H / 15m, the cycle logic and boundary markers stay aligned to weekly positions, preventing timeframe-related drifting or misalignment.

Key Features
1) Weekly-Anchored Bull/Bear Background

Automatically shades the chart background based on the current phase:

Bull phase / Bear phase colors

Fully configurable (on/off + transparency)

2) Cycle Boundary Vertical Lines

Draws vertical lines to mark:

The start of each full cycle

The Bull → Bear transition point
(Each can be toggled on/off)

3) Bear Midline (Week 26)

Adds a gray reference line at the midpoint of the bear phase:

Week 26 inside the 52-week bear market
(Toggleable)

4) Phase Info Boxes (Bull / Bear / Full Cycle)

Shows informational boxes for:

152-week Bull box

52-week Bear box

204-week Full-cycle box

These boxes display phase duration and will compute the percentage change (%) once a bull/bear phase completes.

5) Phase-End Extreme Markers

When a phase ends, the script marks the key extreme:

End of Bull: Bull High

End of Bear: Bear Low

6) Live Status Panel

A real-time label (bottom-right) showing:

Current phase (Bull/Bear)

Current week number inside the phase

Weeks remaining until the next phase

Percentage Change Calculation

You can choose how the phase performance (%) is computed:

Default: Start weekly close → End weekly close

Enable useExtremePct: Use extremes instead

Bull: Start close → Bull phase highest high

Bear: Start close → Bear phase lowest low

EMA200 (Optional)

Includes EMA200 as a long-term trend reference.

Default mode: EMA200 follows the current chart timeframe

Optional mode: you can switch to a weekly EMA200 (recommended if you want it stable across 1D/4H/15m)

Display Height Controls (Important)

To keep the boxes readable across different price scales, the script uses a global anchor:

Highest price from the cycle start up to the present (weekly-aligned)

Then it applies adjustable paddings:

bullPadPct / bearPadPct / cyclePadPct
Controls how far above the anchor high each box is placed (in %)

nowLabelMult
Controls the live status label position relative to the cycle box

If your boxes look too high/low, adjust these parameters first.

Notes / Disclaimer (Not Financial Advice)

This is a visualization + statistics tool, not a trading signal system.

Cycle start date and phase lengths are configurable—feel free to adapt it for different coins or cycle interpretations.

The indicator is based on historical cycle segmentation and does not guarantee that future cycles will repeat.
================================================================
牛市:152 週

熊市:52 週

合計:204 週(約 1,428 天)

不論你把圖表切到 1D、4H、15m,本指標的牛熊判斷與垂直分界線都會以週線位置對齊,避免不同週期下的偏移。

主要功能

週線錨定的牛熊背景色

牛市/熊市背景自動上色(可開關、可調透明度)。

週期分界線(垂直線)

顯示每輪循環起點、牛→熊轉折點(可開關)。

熊市中線(第 26 週灰線)

在 52 週熊市的正中間加一條灰色參考線(可開關)。

階段資訊方塊

牛市 152 週方塊、熊市 52 週方塊、整輪 204 週方塊。

會顯示該段長度與時間,並在牛/熊結束時計算該段的漲跌幅 (%)。

牛/熊結束時的高低點標註

牛市結束時標註該段 Bull High

熊市結束時標註該段 Bear Low

即時狀態提示

右下角顯示目前處於 Bull/Bear、已走到第幾週、距離下一段還有幾週。

漲跌幅計算方式

你可以在設定中切換:

預設:用「該段起始週收盤 → 該段結束週收盤」計算漲跌幅

開啟 useExtremePct:改用極值計算

牛市:起始收盤 → 牛市最高點

熊市:起始收盤 → 熊市最低點

EMA200(可選)

內建 EMA200,作為長期趨勢參考線。

顯示高度控制(重要)

為了讓方塊不會在不同價格尺度下跑到畫面外,本指標使用「從週期起點到現在的最高價」當作全局基準,並提供 padding 參數微調高度:

bullPadPct / bearPadPct / cyclePadPct:控制牛/熊/整輪方塊距離最高價上方的百分比

nowLabelMult:控制右下角狀態標籤相對於整輪方塊的位置

如果你覺得方塊太高或太低,優先調整這些參數即可。

使用提醒(非投資建議)

這是一個 週期視覺化與統計工具,不是交易訊號系統。

週期起點與週數長度可調,若你對不同幣種或不同市場週期有自己的定義,可直接修改參數套用。

本指標僅以歷史週期切分提供參考,不保證未來週期必然重複。

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.