Meridian: Bitcoin Cycle Allocator — Strategy by PseudoNakamoto21

By PseudoNakamoto21

Performance Metrics

Description

Nov 22MERIDIAN: BITCOIN CYCLE ALLOCATORA rules-based strategy for building a Bitcoin position below fair value and taking profit in stages above it, with a trend filter that stops it selling into a confirmed downtrend. One decision per weekly close.━━━━━━━━━━━━━━━━━━━━━━━━━━━━WHAT IT DOES━━━━━━━━━━━━━━━━━━━━━━━━━━━━• Below fair value, it buys: a set share of remaining cash each week. The deeper the discount, the bigger the buy.• Above fair value, it sells: a set share of BTC held each week. The bigger the premium, the bigger the sale.• In between, it holds.• While Bitcoin is in a confirmed downtrend, sales are paused.━━━━━━━━━━━━━━━━━━━━━━━━━━━━HOW IT WORKS━━━━━━━━━━━━━━━━━━━━━━━━━━━━1) Fair value: the Bitcoin power lawBitcoin's price has grown roughly as a power of time since the genesis block. The script fits log10(price) = a + n × log10(days since 3 Jan 2009)to weekly CRYPTO:BTCUSD closes from July 2010. Fair value is this trend line, shifted so that half of all weekly closes sit above it and half below.2) No look-ahead: refitted only at halvingsThe model is refitted at each halving using only data available up to that halving, then frozen until the next one. Every level on the chart was knowable at the time.3) The ladder: levels from history, not guessworkEach level is a percentile of how far price has historically strayed from fair value. DCA 1–5 (green → blue): 28th, 18th, 10th, 2nd and 1st percentiles of all discounts. Exit 1–5 (yellow → red): 50th, 60th, 70th, 80th and 90th percentiles of premiums over the last two halving cycles.For example, DCA 4 marks a discount price has reached only 2% of the time.4) Order sizes DCA 1–5: 5, 10, 15, 20, 25% of remaining cash Exit 1–5: 2, 4, 6, 8, 10% of BTC heldOnly the furthest level reached fires at each weekly close. Sizes are percentages, so the position scales itself and never fully empties or fully commits.5) Trend filter: 200-day SMA setsUsing daily CRYPTO:BTCUSD closes: • Bull set: 7 consecutive closes above the 200-day SMA. • Bear set: 7 consecutive closes below it. • A set ends on the first close back on the other side.By default, exits are paused while a bear set is live. Price can still sit above fair value early in a downtrend, and the filter avoids trimming into that move. Buys are not filtered. Both rules are adjustable, and "Any time" on both turns the filter off.━━━━━━━━━━━━━━━━━━━━━━━━━━━━HOW TO READ THE CHART━━━━━━━━━━━━━━━━━━━━━━━━━━━━• White line: fair value.• Green → blue lines: DCA 1–5 (buy zones, deepest at the bottom).• Yellow → red lines: Exit 1–5 (sell zones, highest at the top).• Shaded bands: the order that fires in that zone. The clear band either side of fair value is the hold zone.• Small dots along the bottom: buys. Small squares: sales. Each takes its level's colour, with an optional size tag.• Dotted lines: fair value and every level projected forward to the next halving.Dashboard• This week: BUY, SELL, HOLD or "filtered out", and where price sits against fair value.• Ladder: today's price for every level, with ◀ NOW marking the active one.• Weeks above and below fair value: in the fitted history, since the last halving, and since your start date.• Trend filter: the current set and whether buys and exits are allowed.• Result: Meridian against buy & hold and plain monthly DCA over the same weeks, including the worst fall from peak.• Holdings: BTC, cash, average buy and sell prices, and number of orders.━━━━━━━━━━━━━━━━━━━━━━━━━━━━HOW TO USE IT━━━━━━━━━━━━━━━━━━━━━━━━━━━━1. Add it to any Bitcoin chart. Signals always come from CRYPTO:BTCUSD and the lines are converted to your chart's price units, so any exchange, quote currency, ETF or futures chart works. A weekly timeframe is recommended.2. Set your capital, fees, slippage and currency in the Properties tab.3. Alerts: Create Alert → Condition: this script → "alert() function calls only". Choose which events alert in the Alerts section.4. Act only at the weekly close, and only on what the dashboard says.5. After the 2028 halving, tick "2028 halving has happened" and enter the date. The model refits itself from that week.━━━━━━━━━━━━━━━━━━━━━━━━━━━━DEFAULT BACKTEST SETTINGS━━━━━━━━━━━━━━━━━━━━━━━━━━━━• Long only, no leverage.• Initial capital 10,000. Commission 0.1% per trade. Slippage 1 tick. Orders filled at the weekly close.• Start date: 10 December 2018, the week of the 2018 cycle low. At that point the model judged price only mildly cheap against its fair value, so its first buy came in March 2020. From a cycle low, buy & hold looks at its strongest, so compare the two with that in mind, and try other start dates. Results depend heavily on where you start.• Results cover only the history your chart has loaded.━━━━━━━━━━━━━━━━━━━━━━━━━━━━LIMITATIONS: PLEASE READ━━━━━━━━━━━━━━━━━━━━━━━━━━━━• The default percentiles, sizes and filter were chosen after testing on the same Bitcoin history the backtest covers. Results are therefore in-sample and will flatter real-time use.• The power law is an empirical pattern, not a law of nature. If Bitcoin's long-run growth bends away from it, fair value and every level will be wrong until the next refit.• Percentile levels describe the past. Future cycles can fall deeper or rise less far.• The ladder deploys most of its cash in a deep, prolonged fall, so it can stay fully invested for a long time.This script is for education and research. It is not financial advice. Past performance does not guarantee future results.Nov 24Release NotesUpdated and hopefully improved.😊Release NotesMERIDIAN: BITCOIN CYCLE ALLOCATORA rules-based strategy for building a Bitcoin position below fair value and taking profit in stages above it, with a trend filter that stops it selling into a confirmed downtrend. One decision per weekly close.━━━━━━━━━━━━━━━━━━━━━━━━━━━━WHAT THIS IS (AND ISN'T)━━━━━━━━━━━━━━━━━━━━━━━━━━━━Meridian is a long-term investment tool, not a trading tool.• Spot BTC only. Long only. No leverage. No perps.• Buy low, sell high: build a position on strong foundations when Bitcoin is cheap against its long-run trend, then take profit in stages before it gets too spicy.• Few decisions by design. Over a full cycle it makes a small number of buys and sells, not hundreds of trades. The dashboard shows exactly how many, and over how many weeks.• Not built for perpetuals or futures. The backtest assumes you own the coins. Funding costs on a position held for months are not included and can wipe out the result. If you load it on a perp chart, the dashboard will warn you.━━━━━━━━━━━━━━━━━━━━━━━━━━━━WHAT IT DOES━━━━━━━━━━━━━━━━━━━━━━━━━━━━• Below fair value, it buys: a set share of remaining cash each week. The deeper the discount, the bigger the buy.• Above fair value, it sells: a set share of BTC held each week. The bigger the premium, the bigger the sale.• In between, it holds.• While Bitcoin is in a confirmed downtrend, sales are paused.━━━━━━━━━━━━━━━━━━━━━━━━━━━━HOW IT WORKS━━━━━━━━━━━━━━━━━━━━━━━━━━━━1) Fair value: the Bitcoin power lawBitcoin's price has grown roughly as a power of time since the genesis block. The script fits log10(price) = a + n × log10(days since 3 Jan 2009)to weekly CRYPTO:BTCUSD closes from July 2010. Fair value is this trend line, shifted so that half of all weekly closes sit above it and half below.2) No look-ahead: refitted only at halvingsThe model is refitted at each halving using only data available up to that halving, then frozen until the next one. Every level on the chart was knowable at the time.3) The ladder: levels from history, not guessworkEach level is a percentile of how far price has historically strayed from fair value. DCA 1–5 (green → blue): 26th, 14th, 6th, 2nd and 1st percentiles of all discounts. Exit 1–5 (yellow → red): 58th, 66th, 74th, 82nd and 90th percentiles of premiums over the last two halving cycles.For example, DCA 4 marks a discount price has reached only 2% of the time.4) Order sizes DCA 1–5: 5, 10, 15, 20, 25% of remaining cash Exit 1–5: 2, 4, 6, 8, 10% of BTC heldOnly the furthest level reached fires at each weekly close. Sizes are percentages, so the position scales itself and never fully empties or fully commits.5) Trend filter: 200-day SMA setsUsing daily CRYPTO:BTCUSD closes: • Bull set: 7 consecutive closes above the 200-day SMA. • Bear set: 7 consecutive closes below it. • A set ends on the first close back on the other side.By default, exits are paused while a bear set is live, and buys are paused while a bull set is live. Price can still sit above fair value early in a downtrend, and the filter avoids trimming into that move. Both rules are adjustable, and "Any time" on both turns the filter off.━━━━━━━━━━━━━━━━━━━━━━━━━━━━HOW TO READ THE CHART━━━━━━━━━━━━━━━━━━━━━━━━━━━━• White line: fair value.• Green → blue lines: DCA 1–5 (buy zones, deepest at the bottom).• Yellow → red lines: Exit 1–5 (sell zones, highest at the top).• Shaded bands: the order that fires in that zone. The clear band either side of fair value is the hold zone.• Small dots along the bottom: buys. Small squares: sales. Each takes its level's colour, with an optional size tag.• Dotted lines: fair value and every level projected forward to the next halving.Dashboard• This week: BUY, SELL, HOLD or "filtered out", and where price sits against fair value.• Ladder: today's price for every level, with ◀ NOW marking the active one.• Weeks above and below fair value: in the fitted history, since the last halving, and since your start date.• Trend filter: the current set and whether buys and exits are allowed.• Result: Meridian against buy & hold and plain monthly DCA over the same weeks, including the worst fall from peak.• Holdings: BTC, cash, average buy and sell prices.• Decisions made: number of buys and exits, and over how many weeks.━━━━━━━━━━━━━━━━━━━━━━━━━━━━HOW TO USE IT━━━━━━━━━━━━━━━━━━━━━━━━━━━━1. Add it to a spot Bitcoin chart. Signals always come from CRYPTO:BTCUSD and the lines are converted to your chart's price units, so any exchange, quote currency or spot ETF works. A weekly timeframe is recommended.2. Set your capital, fees, slippage and currency in the Properties tab.3. Alerts: Create Alert → Condition: this script → "alert() function calls only". Choose which events alert in the Alerts section.4. Act only at the weekly close, and only on what the dashboard says.5. After the 2028 halving, tick "2028 halving has happened" and enter the date. The model refits itself from that week.━━━━━━━━━━━━━━━━━━━━━━━━━━━━DEFAULT BACKTEST SETTINGS━━━━━━━━━━━━━━━━━━━━━━━━━━━━• Spot, long only, no leverage.• Initial capital 10,000. Commission 0.1% per trade. Slippage 1 tick. Orders filled at the weekly close.• Start date: 1 September 2021. Results depend heavily on where you start. From a cycle low, buy & hold looks at its strongest, so try other start dates.• Results cover only the history your chart has loaded.━━━━━━━━━━━━━━━━━━━━━━━━━━━━LIMITATIONS: PLEASE READ━━━━━━━━━━━━━━━━━━━━━━━━━━━━• Few decisions means the result rests on a handful of big cycle calls, not a large sample of trades. Treat the backtest as an illustration, not proof.• The default percentiles, sizes and filter were chosen after testing on the same Bitcoin history the backtest covers. Results are therefore in-sample and will flatter real-time use.• The power law is an empirical pattern, not a law of nature. If Bitcoin's long-run growth bends away from it, fair value and every level will be wrong until the next refit.• Percentile levels describe the past. Future cycles can fall deeper or rise less far.• The ladder deploys most of its cash in a deep, prolonged fall, so it can stay fully invested for a long time.• Spot only. Funding, borrowing and liquidation risk on perps and futures are not modelled.This script is for education and research. It is not financial advice. Past performance does not guarantee future results.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView