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
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.
| Setting | Default | Type and range | Feeds |
|---|---|---|---|
| Script Settings | |||
| Strategy Mode | false | bool | LongCondition ShortCondition plotshape |
| Inputs | |||
| Standard Deviations | 2.0 | float | mid2 top2 bot2 line 55 |
| Blockchain | BTC | string · 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, 1
AssetMoves · 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.
Order rules
| Order | Fires when | By default | Line |
|---|---|---|---|
| Open Long long | LongCondition | On | 71 |
| Open Short short | ShortCondition | On | 73 |
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.
- 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.
| Script | Shares | Type | Net | Trades | Max drawdown |
|---|---|---|---|---|---|
| Big Whale Purchases and Sales this page | — | v5 strategy | 0.0% | 0 | 0.0% |
| BB KANNEMAN by samuelkanneman | bb | v5 strategy | No trades on this market | ||
| Rudy's BB with Martingale by RudyTheGreenBull | bb | v5 strategy | +0.0% | 12 | 0.1% |
| trading YM based on pair trading by hkorange2007 | bb | v5 strategy | No trades on this market | ||
| Bollinger Band Reversion Strategy by Zeal Terminal | bb | v5 strategy | +1.4% | 22 | 2.7% |
| 2x take profit, move stop loss to entry by fpsd4ve | bb | v5 strategy | −0.5% | 66 | 1.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
VerifiedNothing 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
| Engine | Compiles | Runs | Matches TradingView |
|---|---|---|---|
| Zeal Terminal · OpenPineScript v2 | Yes 15 ms | Yes 1,000 bars in 21 ms | Not measured |
| PineTS | Not tested | Not tested | Not 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)