Sunlight and dusk colours for the trend
While holding, the candles and the band of two averages turn gold; while waiting in cash they turn grey. In the lower pane the cycle line fills gold as it rises and violet as it falls.
Built on the Schaff Trend Cycle (STC), devised in the 1990s by FX trader Doug Schaff, it marks buy and sell points on the chart at each daily close.

Drag the handle to compare the chart with and without Sun Cycle.


Calculated from historical data. Future returns are not guaranteed.COINBASE:BTCUSD · 1D · 2023.09–2024.04Chart: TradingView
ProblemMACD reads a trend well, but its signal comes a step late
FixMACD is turned into a 0–100 position within 10 days and smoothed, twice, so it reacts sooner
ProblemSignals flicker during the day, so you never know when to get in
FixSignals are fixed once a day at the daily close and acted on at the next open, so there is no need to watch the chart all day
ProblemYou fear riding a big decline all the way down
FixWhen the cycle line turns down, it steps back into cash the next day and sidesteps the deep part of the decline
While holding, the candles and the band of two averages turn gold; while waiting in cash they turn grey. In the lower pane the cycle line fills gold as it rises and violet as it falls.
Buys show as a sun (☀), profitable sells as a mint check (✔ +x%) and losing sells as a red cross (✖ −x%); the top right of the lower pane shows today's holding or cash day count.
Signals are fixed only after the daily close, so past marks never change. A how-to panel in 8 languages and two alerts (buy, sell) are included.
Coinbase Bitcoin, starting with US$1,000 and trading only on daily-close signals.
| Start | Just holding | Sun Cycle | Worst drop (hold → Sun Cycle) |
|---|---|---|---|
| 2016 | $148,780149× | $224,510225× | −83.8%−46.7%▲37.1%pavoided |
| 2018 | $4,8104.8× | $12,12012.1× | −81.4%−46.7%▲34.7%pavoided |
| 2022 | $1,3601.4× | $2,1602.2× | −67.0%−39.7%▲27.3%pavoided |
| 2024 | $1,4701.5× | $1,4901.5× | −53.1%−39.7%▲13.4%pavoided |
Stepping back into cash when the cycle turned down cut how far the account fell compared with just holding (no leverage, 0.1% cost per buy and per sell).
With the indicator +9.6%
Bitcoin over the last year (2025.11–2026.11): just holding, −29.6%.
With the indicator −39.7%
Bitcoin from 2022: worst drop when just holding, −67.0%.
With the indicator −46.7%
Bitcoin from 2016: worst drop when just holding, −83.8%.
No complicated setup: the copy-code button or the TXT file puts it on TradingView straight away.
Past performance does not guarantee future results.
Built independently by ChartArmory from the Schaff Trend Cycle (STC) calculation by Doug Schaff.
A signal on a closed bar never changes; only today’s unfinished bar can move.
Other symbols and higher timeframes use only data available at that moment, so no future values leak into past signals.
Past examples are calculated after trading costs (0.1% per side), and you can download the raw data as JSON.
The exact names you see in TradingView’s settings (Inputs tab).8 languages supported
Right after the daily close (00:00 UTC), open the chart once a day.
See whether yesterday's closed candle got a new ☀ (buy) or ✔/✖ (sell), and check today's turning-close line that appears when a trade is near.
The indicator places no orders: trade yourself at the open only when a signal appears, and otherwise stay as you are.
Hiring a developer usually costs $2,000–$5,000+ and weeks of building and testing. Here, one payment gets you tested Pine Script v6 source right away, yours to keep.
Use Sun Cycle to decide when to hold a coin and when to wait in cash, and Kelly Meter to decide how much to put in.
View indicatorEach indicator is sold separately; combined results have not been tested.
An indicator devised in the 1990s by FX trader Doug Schaff. It puts the MACD of the 23-day and 50-day exponential moving averages through a stochastic calculation twice, giving a smooth cycle line that swings between 0 and 100, and reads the trend from it.
It trades fairly often: since 2016 it bought Bitcoin 189 times (about 17 times a year). In return it cuts small losses quickly and rides big rises long.
No. Signals are decided on closed daily bars only, so once a signal is final it does not change. The indicator places no orders.
It works on the daily close, so one look right after 00:00 UTC is enough, or turn on the two alerts (buy and sell) and look only when one arrives.
You can turn it on for any symbol on a daily chart. The past numbers on this page are for daily crypto charts (Bitcoin, Ethereum), and it is not a method Schaff used on crypto.
You can edit it for personal use. Sharing, redistribution and resale rights are not included.
Bought as the cycle lifted off the bottom and sold as it turned down at the top: +34.5% after costs in 20 days.
At the daily close of 24 February 2024 the cycle line turned up, so it bought at the next day's open, $51,568.63. It held along the gold candles, past the highest close of $73,135 on 13 March, and at the 15 March close the line turned down, so it sold at the next day's open, $69,514.87 (+34.5%). Three days after the sale, on 19 March, the close fell to $61,906 (−10.9% from the sale price); the next buy came on 29 March at $70,804.
Signal at the daily close, filled at the next day's open, 0.1% cost per buy and per sell · a replay of the TradingView indicator's rule (Coinbase BTC-USD daily)
Download the calculation record (JSON) ↓Get the full Pine Script v6 source code (personal use and modification, no redistribution or resale), the panel and install guide in 8 languages and 30 days of bug-fix support, right away, for one payment.