CHARTARMORY

Install app

  1. Use the install icon on the right of the address bar, or choose the app-install option in the browser menu. Chrome and Edge support this on desktop.
  2. Already installed? Open ChartArmory from your home screen or computer’s app list.
CHARTARMORY

App & notifications

Enable notifications

Only your selected topics. We store your push address, encryption keys, language and choices; turning notifications off deletes this subscription.

Push notifications are not supported in this environment.

← All productsCHARTARMORY · BITCOIN CYCLE GUARD

Pi Cycle Guard

Bitcoin cycle: sell the π top, buy back on cue

ChartArmory's own implementation of the 'Pi Cycle Top' idea Philip Swift published in 2019, with a safety sell and a buy-back rule added.

$99.60One-time payment · Perpetual personal use
Add to my chart
One-time payment includes (yours to keep)
  • Complete Pine Script v6 source code
  • 8-language guide panel and install guide
  • Personal use and edits (no redistribution or resale)
  • 30 days of bug-fix support after purchase
  • Copy button and TXT right after payment
Delivery and refund policy ↗
PI CYCLE GUARD / HISTORICAL CASE

Bitcoin: bought at $380, sold at $19,641 on the day of the cycle top

BTC-USD · 1D · 2015.11 → 2017.12+5,051.5%

Bought the day the 111-day line rose above the 350-day line, sold the day it crossed the π line. The sell day was that cycle's highest close.

Year after the sell
−83.8%
Held for
768 days (about 25 months)

The ▲ buy back was confirmed at the 9 November 2015 close of $380.50. 768 days later, on 16 December 2017, the 111-day line crossed above the π line: π top sell at $19,640.51. A year later Bitcoin was down to $3,185.

  1. 01 / ▲ Buy back$380.50▲ SMA 111 > 350
  2. 02 / π top sell$19,640.51π TOP · SMA 111 > 350×2
  3. 03 / Lowest within a year$3,185.07−83.8%

Signal and fill at that day's close, 0.1% cost per buy and sell · replay of the same rule as the TradingView indicator (CoinMetrics daily closes; exchange charts can differ slightly)

Download the calculation record (JSON) ↓

Same chart. One indicator makes the difference.

Drag the handle to compare the chart with and without Pi Cycle Guard.

Compare the BTC daily chart with and without Pi Cycle Guard · Before indicator
Compare the BTC daily chart with and without Pi Cycle Guard · After indicator
Before indicatorAfter indicator

Calculated from historical data. Future returns are not guaranteed.

BTCUSD · 1D · 2015.06–2018.06Chart: TradingView

PROBLEM → FIX

The three hardest moments in holding Bitcoin long term

  1. ProblemWhen it rallies, you don't know when to sell

    FixThe π top sell appears the day the 111-day line rises above the π line. In 2017 that was the day of the cycle top

  2. ProblemAfter selling, you don't know when to buy back

    FixThe ▲ buy back appears when the 111-day line rises back above the 350-day line, and the panel shows the distance every day

  3. ProblemSome cycles roll over without a top signal

    FixWhen the 111-day line falls below the 350-day line, the ⚠ safety sell appears so you don't ride the whole decline

01 / WHAT IT DOES

Sell at the top, wait, buy back

01

Three signals, set on the daily close

When the 111-day line rises above the π line (350-day × 2): π top sell. When it falls below the 350-day line: ⚠ safety sell. When it rises back above: ▲ buy back. Decided on the close, never repainted.

02

A next-signal guide like a car navigator

One panel in 8 languages shows the next signal and how far away it is (e.g. To buy back in · 3.3% to go), a progress bar, the condition in one sentence, where you are now and the last signal.

03

A top alarm that heats up

The gap between the lines heats up as the 111-day line nears the π line, and stretches spent waiting in cash are tinted grey. All three signals can trigger alerts.

02 / ON YOUR CHART

Signals and the distance to the next one, right on the chart

The lines and the panel in the lower right tell you what you are waiting for.

BITSTAMP:BTCUSD · 1D · 2015.6 → 2019.3 · log scale · Pi Cycle Guard defaults

Bitcoin 2015–2018: ▲ buy back → π TOP on the day of the top

After the ▲ buy back in November 2015 it held, and the π TOP sell came on 16 December 2017, the day of the cycle top. Over the next year Bitcoin fell −83.8%.

BITSTAMP:BTCUSD · 1D · 2022.6 → 2026.10 · next-signal panel

Today: the next-signal guide panel

Waiting in cash since the ⚠ safety sell in January 2026, the panel shows the distance to the next signal, such as 'To buy back in · 3.3% to go'.

03 / EVIDENCE

US$1,000 by start year: plain holding vs Pi Cycle Guard

Bitcoin or cash only, no leverage, recorded up to 22 October 2026.

CoinMetrics Bitcoin daily closes, 0.1% cost per signal. Past results; they do not guarantee future returns.
StartPlain holdingPi Cycle GuardWorst drop (hold → guard)
2015$258,142258×$1,350,3501,350×−83.8%→ −48.6%
2018$6,0356.0×$26,21326.2×−81.4%→ −48.6%
2020$11,33211.3×$27,93527.9×−76.7%→ −32.1%
2022$1,7091.7×$3,1653.2×−66.9%→ −32.1%
2024$1,8451.8×$2,0402.0×−53.1%→ −32.1%
  • Prices and results can differ slightly between data sources (TradingView exchange feeds vs CoinMetrics).
  • Signals are rare, so it can wait in cash for years, and in a cycle that never reaches the π line it exits with the safety sell well below the top.
Trading without the indicator

Holding without this indicator means taking every crash in full

Big Bitcoin declines, plain holding vs following the Pi Cycle Guard rule (0.1% cost per signal).

Without it−83.8%

With the indicator 0.0%

2017.12–2018.12 crash — plain holding −83.8%. The indicator was in cash after the π sell on the day of the top.

Without it−76.7%

With the indicator 0.0%

2021.11–2022.11 bear market — plain holding −76.7%. The indicator was in cash after the π sell in April 2021.

Without it−53.1%

With the indicator −28.0%

2025.10–2026.6 decline — plain holding −53.1%. The π line was never reached, so it exited with the safety sell.

04 / INSTALL

Installed in 3 steps right after payment

Own the complete Pine Script v6 source with one payment and no subscription, and edit it if you like.

  1. 01Press the copy button on the payment-complete page, or download the TXT
  2. 02Paste it into the TradingView Pine Editor, save, and add it to a daily Bitcoin chart
  3. 03Pick the panel language and turn on the π TOP · ⚠ EXIT · ▲ BACK alerts

Past performance does not guarantee future results.

Built by ChartArmory from the Pi Cycle Top idea published by Philip Swift; not affiliated with or endorsed by him.

NO REPAINT · NO FUTURE DATA

3 reasons you can trust it

  • Past signals stay put

    A signal on a closed bar never changes; only today’s unfinished bar can move.

  • No future data

    Other symbols and higher timeframes use only data available at that moment, so no future values leak into past signals.

  • Open raw data

    Past examples are calculated after trading costs (0.1% per side), and you can download the raw data as JSON.

Download raw JSON ↓
INPUTS · PINE SCRIPT V6

Settings you can change

The exact names you see in TradingView’s settings (Inputs tab). · Card in 8 languages

① Cycle rule

  • Fast average (days)
  • Slow average (days)
  • π line = slow average ×
  • Safety exit: fast average crosses below the slow average

Display

  • Language
  • Panel
  • Panel position
  • Heat fill between the lines
  • Grey tint while OUT
  • π TOP · ⚠ EXIT · ▲ BACK marks
5 MIN / DAY

A 5-minute daily routine

  1. 01Check the alert

    Paid plans send signal alerts to your phone; on the free plan, just open the chart once a day.

  2. 02Read the card

    The card on the right shows today’s action and the key lines (position size, stop).

  3. 03Place the order

    Order in your broker app and get back to your day.

WHO IT FITS

Who it fits — and who it doesn’t

Recommended for

  • Office workers who can’t watch charts all day
  • People who want to stick to set position sizes and stops
  • Anyone for whom one chart check a day is enough

Not a fit for

  • Scalpers trading by the second or minute
  • Anyone hunting for a 100%-accurate “magic arrow”
  • People who trade by gut feel rather than rules
BUILD VS BUY

What would it cost to build?

Outsourcing usually costs $200–$500+ and dozens of hours of fixes. Here, one payment gets you tested Pine Script v6 source right away, yours to keep.

Outsourcing$200–$500+ · dozens of hours of fixes
ChartArmoryOne payment · tested source, instantly
PAIR RECIPE

Indicators that work well together

Pi Cycle Guard + Kelly Meter

Let Pi Cycle Guard decide when to hold and when to sit in cash, and Kelly Meter how much to put in.

View indicator →

Each indicator is sold separately; combined results have not been tested.

PI CYCLE GUARD / FAQ

FAQ

What is the π top signal?

The day the 111-day moving average rises above twice the 350-day moving average (the π line; 350 ÷ 111 ≈ 3.15 ≈ π). In Bitcoin's past it landed within days of the cycle tops in 2013 (3 days early), 2017 (the same day) and 2021 (1 day early).

What are its weak points?

Signals are rare, a few per several years, so it can sit in cash for a long time. In a cycle that never reaches the π line, like 2024–25, it exited with the safety sell at $89,940 (2026-01-02), 28% below the $124,824 top.

Do signals change or disappear later?

No. They appear after the daily close confirms them and are never repainted.

Does it use leverage or shorting?

No. It only switches between holding Bitcoin and waiting in cash, with no leverage or shorting. It places no orders.

Can I use it on charts other than Bitcoin?

You can add it to any daily chart, but the rule is tuned to Bitcoin's cycles. Results on other assets can be very different.

Can I edit or share the code?

You can edit it for personal use. Sharing, redistribution and resale rights are not included.

PI CYCLE GUARD · V1

Meet the next Bitcoin cycle with a rule

Put the complete source of Pi Cycle Guard, which tells you the next signal from the top alarm to the buy-back, on your own TradingView chart.

$99.60One-time payment · Perpetual personal use
Add to my chart
CHARTARMORY STUDIO · CUSTOM INDICATORS

Can’t find the right indicator? Request a custom build.

Tell us the conditions and chart displays you have in mind.