Skip to content
ByStock Script · Pine Script® compatible · free

ByStock Script — run Pine indicators free

ByStock Script is our own Pine-compatible scripting engine. Paste an open-source indicator or strategy, press Add to chart — it runs in your browser on multi-exchange data. Share your scripts in the gallery.

Where do you want to trade?CEX · DEX — pick an exchange, start with our discount invite
01

Open the indicator on TradingView and copy all code from its “Source code” tab.

02

On the ByStock chart, press “</> Pine” and paste it.

03

Press “▷ Add to chart”. Settings and colors live in the Inputs/Style dialog, like on TradingView.

</> Open the chartScript gallery

What's supported

✓ Write with AI

“Write with AI” in the editor: describe what you want, paste the prompt (with ByStock's rules) into your own AI — ChatGPT, Claude, Gemini, DeepSeek… free tiers included — and paste the answer back; the code is extracted and runs on the chart. Errors get a one-click fix prompt. No key needed; your code never reaches us.

✓ ByStock only: bs.*

Functions TradingView doesn't have, fed by the site's skills: bs.fib(0.382) — level on the Fib Zone Plan leg, bs.fib_leg() — [direction, high, low], bs.liq() — liquidation balance (−1..+1), bs.funding("binance" | "bybit" | "hyperliquid") — funding 8h equivalent %. See the “ByStock only” examples in the library.

✓ Versions

Pine v6 and v5; legacy v4/v3 syntax (study, sma, security, color=red, transp) runs as-is.

✓ Built-ins

The full TradingView v6 function list: ta.*, math.*, str.*, array.*, map.*, matrix.*, color.*, input.*, timeframe.*…

✓ Language

var/varip, user functions, methods, user-defined types, enums, switch, for/for…in/while, tuples, history [n].

✓ Drawing

plot (all styles), plotshape/char/arrow/candle/bar, hline, fill, bgcolor, barcolor, line, label, box, table, polyline, linefill.

✓ Multi-timeframe

request.security with TradingView's lookahead/gaps and repaint rules; session-aware time(). Intrabar values with request.security_lower_tf: the lower timeframe is loaded from Binance · OKX · Bybit.

✓ Libraries (import)

Paste the library's source once (its library("Name") script); import user/Name/version as L lines then use it. Functions, types, methods and enums work — in Telegram alerts too.

✓ Strategies

strategy() backtests: next-bar-open fills, intrabar path, take-profit/stop/trailing, pyramiding, commission; report and CSV.

✓ Alerts — free, unlimited

Arm any alertcondition or alert() in one click; desktop notification + sound on bar close. Connect Telegram and they reach your phone even with the tab closed. Placeholders like {{ticker}} and {{close}} work.

Honest limits

  • — Invite-only and protected scripts hide their code; they can't be copied anywhere.
  • — Libraries can't be fetched from TradingView automatically (their source lives there); you paste the source once.
  • — Intrabar data (request.security_lower_tf) covers the last ~1500 lower bars the exchanges return; older bars get empty arrays. Chart symbol only.
  • — No financial/economic data or bar magnifier.
  • — Tickers for special chart types (Renko, Kagi…) run on standard candles.
  • — Telegram alerts work on 1h · 4h · 1D · 1W and up to 10 per account; browser alerts are unlimited.
  • — Data differs: we use the Binance · OKX · Bybit spot median; small differences versus a single-exchange chart are normal.

ByStock Pine Library

137 original implementations of popular indicator concepts, written from scratch by ByStock. One click adds them to the chart; the code is yours to open and edit.

Trend
SuperTrend

Trend direction from ATR bands; BUY/SELL marks on flips.

Add to chart →
ATR Trailing Stop

ATR-distance trailing stop that follows price; signal on direction change.

Add to chart →
EMA Ribbon

Ribbon of eight EMAs; ordered stacking marks a strong trend.

Add to chart →
Ichimoku Cloud

Conversion/base lines, forward-shifted cloud and lagging close.

Add to chart →
MTF Trend Dashboard

Trend and RSI across 1h / 4h / 1D / 1W in one table.

Add to chart →
Hull Trend Suite

Three Hull variants (HMA / EHMA / THMA) in one; slope-colored trend with turn markers.

Add to chart →
Adaptive MA (Efficiency Ratio)

Moving average that speeds up or slows down with market efficiency; flattens in chop, hugs price in trends. Efficiency label on the last bar.

Add to chart →
Parabolic SAR Pro

Parabolic stop-and-reverse dots; optional 200 EMA filter keeps only with-trend flips.

Add to chart →
MA Cross Pro

Cross of any two of seven MA types (EMA, SMA, WMA, HMA, RMA, VWMA, ALMA); shaded zone, golden/death cross marks.

Add to chart →
Regression Channel

Least-squares line over the last N bars with deviation bands; slope and Pearson R (how clean the trend is) in a label.

Add to chart →
Aroon Trend

Trend freshness from the time since the last high and low; up/down lines plus oscillator.

Add to chart →
Vortex Trend

Ratio of positive vs negative trend movement; line crosses mark trend starts.

Add to chart →
SuperTrend MTF

Chart SuperTrend plus a higher-timeframe SuperTrend (non-repainting); signals only when both timeframes agree.

Add to chart →
Range Filter Trend

Step-like trend line and bands that filter noise by the average move range; one signal per direction change.

Add to chart →
Zero-Lag Trend

Lag-corrected EMA with a volatility band; trend flips when price breaks the band, plus in-trend re-entry marks.

Add to chart →
CCI-ATR Trend Line

Trend line that walks below or above price by an ATR distance depending on CCI's sign, never stepping back.

Add to chart →
Kalman Smoother

State-estimation filter smoothing price: separate responsiveness and noise settings; low lag, slope-colored direction.

Add to chart →
Trend Strength Meter

Slope of ten EMAs of different lengths and price's position in one score (−100…+100); beyond ±60 is a strong trend.

Add to chart →
Momentum
Squeeze Momentum

Squeeze when Bollinger sits inside Keltner; momentum direction on release.

Add to chart →
WaveTrend Oscillator

Wave oscillator from channel deviation; cross dots in extreme zones.

Add to chart →
RSI + Divergences

Draws bullish/bearish divergences between RSI and price.

Add to chart →
MACD Pro

Four-color histogram with above/below-zero cross marks.

Add to chart →
Stoch RSI Signals

Stochastic RSI; K/D crosses in extreme zones are marked.

Add to chart →
ADX & DI

Trend strength (ADX) and direction (+DI / −DI); strong-trend threshold.

Add to chart →
Multi-Oscillator Divergences

Scans six oscillators (RSI, MACD, Stochastic, CCI, OBV, MFI) for divergence at once; the agreeing count is printed on price.

Add to chart →
RSI Trailing Bands

Volatility band trailing a smoothed RSI; direction flips when RSI breaks the band — a noise-resistant momentum signal.

Add to chart →
CCI Pro

Commodity channel index with ±100 / ±200 zones, colored columns, signal line and exit-from-extreme marks.

Add to chart →
True Strength Index

Double-smoothed momentum; low-lag, low-noise with signal crosses and histogram.

Add to chart →
Dual %R Exhaustion

Fast and slow percent-range oscillators together; when both sit at an extreme the exhaustion zone is shaded.

Add to chart →
Fisher Transform

Transform that pushes price toward a normal distribution; sharper turning points with trigger-line crosses.

Add to chart →
Rate of Change Pro

Percent rate of change with signal average, colored histogram and zero crosses.

Add to chart →
KST Oscillator

Weighted sum of four rate-of-change horizons; captures longer momentum cycles.

Add to chart →
Z-Score

How many standard deviations price is from its mean; beyond ±2 is stretched, marks on the return inside.

Add to chart →
Bull & Bear Power

Buyer and seller strength: distance of high and low from an EMA; read with the EMA slope for pullback entries.

Add to chart →
Stochastic Pro

%K/%D with overbought/oversold zones; signals only on crosses INSIDE the zones (less noise).

Add to chart →
MACD MTF

MACD from any timeframe you choose (empty = chart); four-color histogram, signal and zero crosses.

Add to chart →
RSI MTF Pro

Chart RSI with a higher-timeframe RSI; 40/60 regime zones (bull markets hold RSI 40) and signals when timeframes agree.

Add to chart →
Composite RSI

Three-part short-term extreme gauge: 3-period RSI, RSI of the up/down streak and the percentile rank of the 1-bar change. For pullback entries.

Add to chart →
Trend Cycle Oscillator

Fast cycle oscillator applying a stochastic to MACD twice; 25/75 crosses turn earlier than MACD.

Add to chart →
Long-Term Momentum Curve

Weighted average of two long-horizon rates of change; an upturn below zero marks major bottoming zones (weekly/monthly).

Add to chart →
Ultimate Oscillator

Weighted ratio of buying pressure over three horizons (7/14/28); reduces the false signals of single-period oscillators.

Add to chart →
Midpoint Momentum (5/34)

Difference of 5- and 34-period averages of the bar midpoint; colored histogram, acceleration line and zero crosses.

Add to chart →
Volume
VWAP Bands

Session/week/month-anchored VWAP with two standard-deviation bands.

Add to chart →
Relative Volume

Volume relative to its average; spikes above the threshold are highlighted.

Add to chart →
Volume Profile

Volume by price over the last N bars (right-aligned); POC and value area.

Add to chart →
OBV Pro

On-balance volume with signal average and OBV breakouts — catches volume breaking out before price does.

Add to chart →
Money Flow Balance

Volume-weighted accumulation/distribution balance from where each close sits in its range; above zero is buying pressure.

Add to chart →
Money Flow Index

Volume-weighted RSI: above 80 overbought, below 20 oversold; marks on exits from the zones.

Add to chart →
Volume Delta (estimated)

Each bar's buy/sell volume is ESTIMATED from where the close sits in the bar (not tick data); per-bar delta and session-reset cumulative delta.

Add to chart →
Anchored VWAP

Volume-weighted average price anchored to session, week, month, quarter, year or a time you choose; ±1 and ±2 deviation bands.

Add to chart →
Volume Spikes & Climax

Volume at multiples of its average; wide-range climax bars and narrow-range high-volume absorption bars in distinct colors.

Add to chart →
VWAP Session / Week / Month

Daily, weekly and monthly VWAP at once; alignment marks when price is above or below all three.

Add to chart →
Accumulation / Distribution

Cumulative accumulation/distribution line with a signal average; moves against price reveal hidden buying/selling.

Add to chart →
Ease of Movement

How far price moves per unit of volume; above zero rises easily, below falls easily (volume normalized).

Add to chart →
Volume Heatmap Bars

Colors candles by how statistically extreme their volume is (low → extreme); extreme bars are marked.

Add to chart →
Market structure
Market Structure — BOS / CHoCH

Swing points (HH, HL, LH, LL), break of structure (BOS) and change of character (CHoCH).

Add to chart →
Fair Value Gaps

Three-candle price imbalances (FVG); removed once filled.

Add to chart →
Liquidity Sweeps

A swing high/low taken by a wick with the close back inside (liquidity grab).

Add to chart →
Auto Trendlines

Trendlines auto-drawn through the last two lower highs and higher lows.

Add to chart →
Order Blocks

The last opposite candle before a break of structure is boxed; the box is removed once price trades through it (close or wick).

Add to chart →
Swing Points HH / HL / LH / LL

Labels swing highs/lows as HH, HL, LH, LL, joins them with a zigzag; corner panel shows the current structure (rising / falling / mixed).

Add to chart →
Equal Highs & Lows

Nearly equal highs/lows (liquidity pools) are linked and tagged EQH / EQL; tolerance scales with ATR.

Add to chart →
Premium & Discount Zones

The last N bars' range is split into premium (top), equilibrium (middle) and discount (bottom); price's position in the range is printed.

Add to chart →
Supply & Demand Zones

A strong impulse (ATR multiple) after a small-bodied base candle draws a supply/demand zone; removed once price trades through.

Add to chart →
Break & Retest

A swing level breaks, price comes back to test it and holds — then a signal; the level and break are drawn.

Add to chart →
ZigZag Pro

Percent- or ATR-threshold zigzag; each leg shows its percent change and bar count, average leg size in a table.

Add to chart →
Strategies
EMA Cross + ATR Stop

EMA-cross entries with ATR-based stop and reward/risk target.

Add to chart →
RSI Mean Reversion

Buys RSI oversold with a trend filter, exits on reversion to the mean.

Add to chart →
Donchian Breakout

Enters on an N-bar channel breakout, exits on the opposite shorter channel (trend following).

Add to chart →
SuperTrend Strategy

Entries on SuperTrend flips, trailing stop on the SuperTrend line and an optional R-multiple target; backtest includes commission.

Add to chart →
MACD Trend Strategy

MACD crosses only in the direction of the long-term trend; with ATR stop and target.

Add to chart →
Bollinger Reversion Strategy

Buy when a close returns inside after dipping below the lower band, exit at the basis; ATR disaster stop.

Add to chart →
Squeeze Breakout Strategy

Enters in the momentum direction when Bollinger bands leave the Keltner channel (squeeze release); trailing ATR stop.

Add to chart →
RSI-2 Pullback Strategy

In a long-term uptrend (price > 200 SMA) buy when 2-period RSI is oversold, exit on a close above a short average; ATR disaster stop.

Add to chart →
Channel Breakout 55/20 Strategy

Enter on a 55-bar channel breakout, exit on the opposite 20-bar channel; 2 ATR protective stop. Classic trend following.

Add to chart →
Hull Trend Strategy

Enter/reverse on Hull moving average direction changes; optional long-only mode and ATR stop.

Add to chart →
Bar Up/Down Strategy

Buy an up bar closing above the prior high, sell a down bar closing below the prior low; ATR stop. (Crypto trades 24/7, so the prior bar's range replaces the opening gap.)

Add to chart →
Consecutive Up/Down Strategy

Buy after N consecutive higher closes, sell after N consecutive lower closes.

Add to chart →
Inside Bar Breakout Strategy

After an inside bar, place stop orders at its high/low for the breakout.

Add to chart →
Outside Bar Strategy

An outside bar (exceeds the prior range both ways) closing up is a buy, closing down a sell.

Add to chart →
Keltner Channels Strategy

Buy a break of the upper Keltner band, sell a break of the lower; exit at the middle line.

Add to chart →
Momentum Strategy

Buy when momentum and momentum-of-momentum are above zero, sell when below.

Add to chart →
Price / MA Cross Strategy

Buy when price crosses above its moving average, sell when it crosses below.

Add to chart →
Two-MA Cross Strategy

Buy when the fast average crosses above the slow one, sell when it crosses below.

Add to chart →
Parabolic SAR Strategy

Stop-and-reverse on Parabolic SAR flips.

Add to chart →
Pivot Extension Strategy

Fade new pivot highs (short) and new pivot lows (long).

Add to chart →
Pivot Reversal Strategy

Buy a break above the last pivot high, sell a break below the last pivot low.

Add to chart →
Price Channel Strategy

Buy a break of the N-bar high, sell a break of the N-bar low.

Add to chart →
Stochastic Slow Strategy

Buy when slow %K crosses above %D in oversold, sell when it crosses below in overbought.

Add to chart →
Volatility Expansion Close Strategy

Enter in the direction of a close beyond the prior close ± k·ATR (volatility expansion).

Add to chart →
ADX / DI Trend Strategy

With ADX above a threshold, buy +DI crossing above −DI and sell the opposite cross.

Add to chart →
CCI Reversal Strategy

Buy CCI crossing up through −100, sell CCI crossing down through +100.

Add to chart →
Williams %R Strategy

Buy %R crossing up through −80, sell crossing down through −20.

Add to chart →
MFI Reversal Strategy

Buy MFI crossing up through 20, sell crossing down through 80.

Add to chart →
Triple EMA Trend Strategy

Long when three EMAs are stacked fast > mid > slow, short when inverted; exit when the stack breaks.

Add to chart →
Ichimoku Cloud Strategy

Above the cloud buy a Tenkan/Kijun bullish cross; below it sell the bearish cross.

Add to chart →
VWAP Reversion Strategy

Fade moves k standard deviations away from VWAP, exit back at VWAP.

Add to chart →
Fisher Transform Strategy

Enter reversals when the Fisher Transform crosses its trigger in extreme zones.

Add to chart →
Heikin Ashi Trend Strategy

Buy when the Heikin Ashi candle turns green, sell when it turns red.

Add to chart →
Z-Score Mean Reversion Strategy

Buy when the z-score drops below −2, sell above +2; exit at zero.

Add to chart →
ATR Breakout Strategy

Buy a close k ATR above the average, sell k ATR below; exit at the average.

Add to chart →
Elder Impulse Strategy

Buy when both the EMA and the MACD histogram rise, sell when both fall.

Add to chart →
Aroon Crossover Strategy

Buy when Aroon Up crosses above Aroon Down, sell the opposite.

Add to chart →
Opening Range Breakout (Daily) Strategy

Trade a breakout of the first N bars of the UTC day; flat at the end of the day.

Add to chart →

Accuracy and privacy

Checked value by value

Every release runs a test set of indicators and strategies through our engine and an independent open-source Pine runner and compares every plotted value. Known, deliberate differences are documented.

Your code stays in your browser

Scripts run in a sandboxed Web Worker on your device and are saved only in this browser. We never upload them.