Zeal Terminal Open in Zeal Terminal

Pine Script v5 · Strategy

Big Whale Purchases and Sales

A Pine Script v5 strategy built on Change (Assets, 1) and BB (AssetMoves, 21). It has 2 order rules, 2 entries among them, and trades long and short with the default settings. Exits wait for a signal; there is no stop loss. Each trade commits 100 in cash and pays no commission. 3 settings; defaults include Standard Deviations 2.0 and Blockchain BTC.

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 Big Whale Purchases and Sales repaint?
No
No repainting patterns were found in the source. The live replay was not measured: it had no trades to compare.
How did Big Whale Purchases and Sales 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 Big Whale Purchases and Sales run in Pine Script v6?
Not tested
Neither version placed a trade on any of the 8 markets, so there was nothing to compare. The v6 version is shown for reference and is not offered as a download.
Does Big Whale Purchases and Sales use a stop loss?
No
Every exit waits for a signal; nothing limits a losing trade before it fires.
Does Big Whale Purchases and Sales run in Zeal Terminal?
Yes
It compiles in 15 ms and runs 1,000 bars in 21 ms, in the browser.

BTCUSDT · 1D · default settings

  • Winning trade
  • Losing trade
  • Equity
  • Buy and hold
40,00060,00080,000100,000120,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 INTOTHEBLOCK:BTC_WHALESASSETS D, which this page cannot load in your browser.

Needs INTOTHEBLOCK:BTC_WHALESASSETS 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
Script Settings
Strategy ModefalseboolLongCondition ShortCondition plotshape
Inputs
Standard Deviations2.0floatmid2 top2 bot2 line 55
BlockchainBTCstring · options ["BTC", "ETH", "DOGE", "ADA", "MATIC", "SHIB", "UNI", "OKB", "LEO", "LINK", "LTC", "FTT", "CRO", "ALGO", "QNT", "BCH", "SAND", "MANA", "FXS", "AAVE", "CHZ", "HT", "LDO", "KCS", "AXS", "MKR", "ZEC", "GRT", "FTM", "SNX", "NEXO", "CRV", "BIT", "DASH", "BAT", "ENS"]SourceA

What it calculates

  • ChangeAssets, 1AssetMoves · line 50
  • BBAssetMoves, 21, Standard Deviations (2.0)mid2 · line 56
  • BBAssetMoves, 21, Standard Deviations (2.0)top2 · line 56
  • BBAssetMoves, 21, Standard Deviations (2.0)bot2 · line 56

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.

StdDevsStandard Deviationssetting · 2.0SourceBlockchainsetting · BTCclosecloseprice dataAssetMovesChange→ AssetMovesmid2BB→ mid2top2BB→ top2bot2BB→ bot2SourceASourceAvalueAssetsAssetsvaluebotbotvaluetoptopvaluemidmidvalueLongConditionLongConditionconditionShortConditionShortConditionconditionentry:LongOpen Longstrategy.entryentry:ShortOpen Shortstrategy.entryplotshape:64plotshapeplotshapeplotshape:65plotshapeplotshape

Order rules

OrderFires whenBy defaultLine
Open Long longLongConditionOn71
Open Short shortShortConditionOn73

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 data1 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 INTOTHEBLOCK:BTC_WHALESASSETS D, and that data is not available here (not a Binance spot market). Its results would rest on empty values.

Similar scripts

Indicators and strategies built from the same calculations, run on BTCUSDT 1D with their own defaults so they can be compared directly.

ScriptSharesTypeNetTradesMax drawdown
Big Whale Purchases and Sales this page—v5 strategy0.0%00.0%
BB KANNEMAN by samuelkannemanbbv5 strategyNo trades on this market
Rudy's BB with Martingale by RudyTheGreenBullbbv5 strategy+0.0%120.1%
trading YM based on pair trading by hkorange2007bbv5 strategyNo trades on this market
Bollinger Band Reversion Strategy by Zeal Terminalbbv5 strategy+1.4%222.7%
2x take profit, move stop loss to entry by fpsd4vebbv5 strategy−0.5%661.7%

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.

  • 1 setting uses the untyped input() (line 7). It still compiles in v6; input.int, input.float or input.source state the type.
  • 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?

Not tested

Neither version placed a trade on any of the 8 markets, so there was nothing to compare. 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("Big Whale Purchases and Sales", "Big Whale Moves", overlay=true, initial_capital = 100, default_qty_type = strategy.cash, default_qty_value = 100, pyramiding = 5)⋯

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 15 msYes 1,000 bars in 21 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("Big Whale Purchases and Sales", "Big Whale Moves", overlay=true, initial_capital = 100, default_qty_type = strategy.cash, default_qty_value = 100, pyramiding = 5)UseStrategy = input.bool(false,"Strategy Mode", "Use this box to switch between strategy and indicator mode", group = "Script Settings")//InputsStdDevs = input(2.0,"Standard Deviations", "How many Standard Deviations need to be passed to identify an outlier. 0 will show all changes in whale holdings.", group = "Inputs")//Chain IDSource = input.string(title="Blockchain", defval="BTC", options=["BTC", "ETH", "DOGE", "ADA", "MATIC", "SHIB", "UNI", "OKB", "LEO", "LINK", "LTC", "FTT", "CRO", "ALGO", "QNT", "BCH", "SAND", "MANA", "FXS", "AAVE", "CHZ", "HT", "LDO", "KCS", "AXS", "MKR", "ZEC", "GRT", "FTM", "SNX", "NEXO", "CRV", "BIT", "DASH", "BAT", "ENS"], group="Inputs")SourceA = switch Source    "BTC"   => "INTOTHEBLOCK:BTC_WHALESASSETS"    "ETH"   => "INTOTHEBLOCK:ETH_WHALESASSETS"    "DOGE"  => "INTOTHEBLOCK:DOGE_WHALESASSETS"    "ADA"   => "INTOTHEBLOCK:ADA_WHALESASSETS"    "MATIC" => "INTOTHEBLOCK:MATIC_WHALESASSETS"    "SHIB"  => "INTOTHEBLOCK:SHIB_WHALESASSETS"    "UNI"   => "INTOTHEBLOCK:UNI_WHALESASSETS"    "OKB"   => "INTOTHEBLOCK:OKB_WHALESASSETS"    "LEO"   => "INTOTHEBLOCK:LEO_WHALESASSETS"    "LINK"  => "INTOTHEBLOCK:LINK_WHALESASSETS"    "LTC"   => "INTOTHEBLOCK:LTC_WHALESASSETS"    "FTT"   => "INTOTHEBLOCK:FTT_WHALESASSETS"    "CRO"   => "INTOTHEBLOCK:CRO_WHALESASSETS"    "ALGO"  => "INTOTHEBLOCK:ALGO_WHALESASSETS"    "QNT"   => "INTOTHEBLOCK:QNT_WHALESASSETS"    "BCH"   => "INTOTHEBLOCK:BCH_WHALESASSETS"    "SAND"  => "INTOTHEBLOCK:SAND_WHALESASSETS"    "MANA"  => "INTOTHEBLOCK:MANA_WHALESASSETS"    "FXS"   => "INTOTHEBLOCK:FXS_WHALESASSETS"    "AAVE"  => "INTOTHEBLOCK:AAVE_WHALESASSETS"    "CHZ"   => "INTOTHEBLOCK:CHZ_WHALESASSETS"    "HT"    => "INTOTHEBLOCK:HT_WHALESASSETS"    "LDO"   => "INTOTHEBLOCK:LDO_WHALESASSETS"    "KCS"   => "INTOTHEBLOCK:KCS_WHALESASSETS"    "AXS"   => "INTOTHEBLOCK:AXS_WHALESASSETS"    "MKR"   => "INTOTHEBLOCK:MKR_WHALESASSETS"    "ZEC"   => "INTOTHEBLOCK:ZEC_WHALESASSETS"    "GRT"   => "INTOTHEBLOCK:GRT_WHALESASSETS"    "FTM"   => "INTOTHEBLOCK:FTM_WHALESASSETS"    "SNX"   => "INTOTHEBLOCK:SNX_WHALESASSETS"    "NEXO"  => "INTOTHEBLOCK:NEXO_WHALESASSETS"    "CRV"   => "INTOTHEBLOCK:CRV_WHALESASSETS"    "BIT"   => "INTOTHEBLOCK:BIT_WHALESASSETS"    "DASH"  => "INTOTHEBLOCK:DASH_WHALESASSETS"    "BAT"   => "INTOTHEBLOCK:BAT_WHALESASSETS"    "ENS"   => "INTOTHEBLOCK:ENS_WHALESASSETS"Assets = request.security(SourceA, "D", close)//Define day to day changeAssetMoves = ta.change(Assets,1)//Catch outliersvar float bot=0var float top=0var float mid=0if StdDevs != 0    [mid2,top2,bot2]=ta.bb(AssetMoves,21,StdDevs)    mid:=mid2    top:=top2    bot:=bot2else    top:=0    bot:=0//Mark the corresponding Barsplotshape(AssetMoves>top and not UseStrategy,"Purchase",shape.triangleup, location.belowbar, size=size.normal, color=color.green, text = "Purchase", textcolor = color.green)plotshape(AssetMoves<bot and not UseStrategy,"Sale",shape.triangledown, location.abovebar, size=size.normal, color=color.red, text = "Sale", textcolor = color.red)//Order ConditionsLongCondition = AssetMoves>top and UseStrategyShortCondition = AssetMoves<bot and UseStrategy//Order Executionif LongCondition    strategy.entry("Long", strategy.long)if ShortCondition    strategy.entry("Short", strategy.short)