Zeal Terminal Open in Zeal Terminal

Pine Script v5 · Strategy

MVRV Z Score and MVRV Free Float Z-Score

A Pine Script v5 strategy built on Crossunder (Zscore, 0.1) and Crossover (Zscore, 7.0). It has 2 order rules, 1 entry among them, and trades long only with the default settings. Exits wait for a signal; there is no stop loss. Each trade commits 100 in cash and pays no commission. 5 settings; defaults include Calculation Method Standard, Market Cap Source Glassnode and Upper Line 7.0.

Generated from the script's code by a template: every clause is a fact read from the source. Not written by a person or a model, and not taken from the author's description.

Does MVRV Z Score and MVRV Free Float Z-Score repaint?
No
No repainting patterns were found in the source. The live replay was not measured: it had no trades to compare.
How did MVRV Z Score and MVRV Free Float Z-Score do on BTCUSDT 1D with default settings?
Not measured
It closed no trades there from 26 Jan 2024 to 21 Oct 2026 with the default settings, so there is no result to report. Its entry conditions never all held on this data. It closed no trades on the other markets either. A backtest, not investment advice.
Does MVRV Z Score and MVRV Free Float Z-Score run in Pine Script v6?
No
The v6 version does not run in Zeal Terminal's engine: Pine Script v6 Error at @L37:C47: 'plot' has no 'transp' parameter in Pine Script v6. Use color.new(color, transparency) instead. The v6 version is shown for reference and is not offered as a download.
Does MVRV Z Score and MVRV Free Float Z-Score use a stop loss?
No
Every exit waits for a signal; nothing limits a losing trade before it fires.
Does MVRV Z Score and MVRV Free Float Z-Score run in Zeal Terminal?
Yes
It compiles in 19 ms and runs 1,000 bars in 63 ms, in the browser.

BTCUSDT · 1D · default settings

  • Crossunder
  • Crossover
  • Winning trade
  • Losing trade
  • Equity
  • Buy and hold
0.0050,000100,000AprJulOct2025AprJulOct2026AprJulOct$100$203Equity from $100
Binance BTCUSDT 1D candles, 26 Jan 2024 to 21 Oct 2026, 1,000 bars, default settings. Triangles mark entries; circles mark exits. The script plots nothing itself; the lines and the lower pane are its own calculations, drawn for reference. The live re-run is not offered here: the script requests GLASSNODE:BTC_MARKETCAP D, CRYPTOCAP:BTC D, COINMETRICS:BTC_MARKETCAPFF D, COINMETRICS:BTC_MARKETCAPREAL D, which this page cannot load in your browser.

Needs GLASSNODE:BTC_MARKETCAP D data, not available: not a Binance spot market Needs CRYPTOCAP:BTC D data, not available: not a Binance spot market Needs COINMETRICS:BTC_MARKETCAPFF D data, not available: not a Binance spot market Needs COINMETRICS:BTC_MARKETCAPREAL D data, not available: not a Binance spot market Values that depend on it are empty on this chart.

Net profit
0.00%
$0.00
Buy and hold
+102.5%
same period
Closed trades
0
0 won · 0 lost
Profitable
0.0%
of closed trades
Profit factor
—
gross profit ÷ gross loss
Max drawdown
0.00%
$0.00

One run with the author's default settings, $100 starting capital, commission as the script sets it. A single backtest says little about future results and is not a recommendation. Backtests are simulations on historical data and are not investment advice.

Review

What a careful reader of this script would point out, found by checking the source and the backtest.

  • Check

    No stop loss

    Every exit waits for a signal. Nothing limits a losing trade before the exit condition fires.

  • Check

    No commission

    The backtest assumes free trading. Results on any real exchange will be lower.

  • Note

    No slippage

    Fills are assumed at the exact open price. Add slippage in the properties for a more realistic test.

Settings

Every input the script declares, with its default and what it feeds. Bounds are the ones the script enforces.

SettingDefaultType and rangeFeeds
Strategy Modefalseboolentry Long close Long line 50 line 52
Calculation MethodThe standard calculation uses the market cap while the free float version uses the free float market cap.Standardstring · options ["Standard","Free Float"]line 28 line 30 line 32 line 34
Market Cap SourceGlassnodestring · options ["Glassnode","Coinmetrics"]line 22
Upper LineZ-Score value above which a sell signal is given, standard is 7.7.0floatUpperLine TakeProfit
Lower LineZ-Score value below which a buy signal is given, standard is 0.1.0.1floatLowerLine Long

What it calculates

  • CrossunderZscore, Lower Line (0.1)Long · line 47
  • CrossoverZscore, Upper Line (7.0)TakeProfit · line 48

Signal flow

How price data and settings reach the orders. Each box is a name in the script, or several computed the same way; each arrow is a value one of them reads. Hover a box for its members.

LowerLower Linesetting · 0.1UpperUpper Linesetting · 7.0closecloseprice dataLongCrossunder→ LongTakeProfitCrossover→ TakeProfitMC1, MC2, MCF, MCRMC1 · MC2 +24 valuesMCMCvalueMVRVMVRVvalueZscoreZscorevalueStdDevAStdDevAvalueUpperLineUpperLinevalueLowerLineLowerLinevalueMCAMCAconditionentry:LongOpen Longstrategy.entryclose:LongClose Longstrategy.closeplot:37MVRVplotplot:38Z-scoreplotplot:42plotplotplot:43plotplotfill:44Fillfill × 2fill:45Fillfill × 2

Order rules

OrderFires whenBy defaultLine
Open Long longLong and StrategymodeOn51
Close LongTakeProfit and StrategymodeOn53

Each order is guarded by the setting shown. “Off” orders never fire unless that setting is switched on.

Does it repaint?

No

No repainting patterns in the source.

Not measuredNo trades to compareThe last 300 bars, from 26 Dec 2025, were fed to the engine as live ticks, but neither the live nor the historical run produced any trades in them, so the replay says nothing either way.
  • ClearHigher-timeframe data4 request.security call(s), none with lookahead on.
  • ClearFuture-bar referencesNo negative history offsets such as close[-1].
  • ClearIntrabar recalculationNo varip, calc_on_every_tick or realtime-only state. Orders are decided once per closed bar.
  • ClearOrder timingOrders fill at the next bar's open, after the signal bar has closed.

The checks read the source; the replay runs it. Together they catch the common causes, not every possible one.

Other markets

Not run on other markets: the script requests GLASSNODE:BTC_MARKETCAP D, CRYPTOCAP:BTC D, COINMETRICS:BTC_MARKETCAPFF D, COINMETRICS:BTC_MARKETCAPREAL D, and that data is not available here (not a Binance spot market; not a Binance spot market; not a Binance spot market; not a Binance spot market). Its results would rest on empty values.

Similar scripts

No other indicator or strategy here shares enough of its calculations.

Upgrade and export

Written in Pine Script v5. The clean-v5 step types the settings and moves when = into if blocks, which v6 requires; it is run before and after like any upgrade.

  • No v6-only features. v6 is not needed to run this script.

Clean v5

Verified

Nothing to change.

Does it run in Pine Script v6?

No

The v6 version does not run in Zeal Terminal's engine: Pine Script v6 Error at @L37:C47: 'plot' has no 'transp' parameter in Pine Script v6. Use color.new(color, transparency) instead. The v6 version is shown for reference and is not offered as a download. It differs from the v5 version by 1 edit.

⋯// © Powerscooter-//@version=5+//@version=6strategy("MVRV Z Score and MVRV Free Float Z-Score",shorttitle = "MVRV Z Score",precision=2,default_qty_type = strategy.cash, default_qty_value = 100, initial_capital = 100)⋯

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 19 msYes 1,000 bars in 63 msNot measured
PineTSNot testedNot testedNot measured

“Matches TradingView” needs this script's own output exported from TradingView and compared bar by bar, which has not been done for this script. The engine is built on OpenPineScript, whose conformance results are in its conformance report.

Source

Copied verbatim from the author's published script, with its licence header intact. The author may have updated the original since this snapshot.

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/// © Powerscooter//@version=5strategy("MVRV Z Score and MVRV Free Float Z-Score",shorttitle = "MVRV Z Score",precision=2,default_qty_type = strategy.cash, default_qty_value = 100, initial_capital = 100)//InputsStrategymode = input.bool(false,"Strategy Mode","Switches between indicator and strategy mode.")Calculation = input.string("Standard", "Calculation Method",options = ["Standard","Free Float"], tooltip = "The standard calculation uses the market cap while the free float version uses the free float market cap.")Source = input.string("Glassnode", "Market Cap Source",options = ["Glassnode","Coinmetrics"])Upper = input.float(7.0,"Upper Line",tooltip="Z-Score value above which a sell signal is given, standard is 7.")Lower = input.float(0.1,"Lower Line",tooltip="Z-Score value below which a buy signal is given, standard is 0.1.")//QueryMC1 = request.security("GLASSNODE:BTC_MARKETCAP","D",close)MC2 = request.security("CRYPTOCAP:BTC","D",close)MCF = request.security("COINMETRICS:BTC_MARKETCAPFF","D",close)MCR = request.security("COINMETRICS:BTC_MARKETCAPREAL","D",close)//Initialize varvar float MC = 0var MCA = array.new<float>()var float MVRV = 0var float Zscore = 0//Calculationsif Source=="Glassnode"    MC := MC1else    MC := MC2array.push(MCA,MC)StdDevA = array.stdev(MCA)if Calculation=="Standard"    MVRV := MC/MCRif Calculation=="Free Float"    MVRV := MCF/MCRif Calculation=="Standard"      Zscore := (MC-MCR)/StdDevAif Calculation=="Free Float"      Zscore := (MCF-MCR)/StdDevA//PlottingMVRVplot = plot(MVRV, "MVRV", color=color.blue,transp=40)Zplot = plot(Zscore, "Z-score",color=color.yellow,linewidth = 2)UpperLine = Zscore>=Upper?Upper:naLowerLine = Zscore<=Lower?Lower:na//Lower and UpperLine are undefined when Zscore isn't close to them so they don't affect panel scaling.UpperPlot = plot(UpperLine, transp=100, trackprice = true, color=color.red, display=display.all-display.status_line)LowerPlot = plot(LowerLine, transp=100, trackprice = true, color=color.green, display=display.all-display.status_line)fill(plot1=Zplot,plot2=UpperPlot,color=color.red, transp=30)fill(plot1=Zplot,plot2=LowerPlot,color=color.green, transp=30)//Order ConditionsLong = ta.crossunder(Zscore,Lower)TakeProfit = ta.crossover(Zscore,Upper)//Executionif Long and Strategymode    strategy.entry("Long",strategy.long)if TakeProfit and Strategymode    strategy.close("Long")