Run open-source Pine indicators on ByStock — free
Paste an open-source indicator or strategy, press Add to chart. Our own engine runs it in your browser, on multi-exchange data.
Open the indicator on TradingView and copy all code from its “Source code” tab.
On the ByStock chart, press “</> Pine” and paste it.
Press “▷ Add to chart”. Settings and colors live in the Inputs/Style dialog, like on TradingView.
What's supported
Pine v6 and v5; legacy v4/v3 syntax (study, sma, security, color=red, transp) runs as-is.
The full TradingView v6 function list: ta.*, math.*, str.*, array.*, map.*, matrix.*, color.*, input.*, timeframe.*…
var/varip, user functions, methods, user-defined types, enums, switch, for/for…in/while, tuples, history [n].
plot (all styles), plotshape/char/arrow/candle/bar, hline, fill, bgcolor, barcolor, line, label, box, table, polyline, linefill.
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.
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.
strategy() backtests: next-bar-open fills, intrabar path, take-profit/stop/trailing, pyramiding, commission; report and CSV.
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
133 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 direction from ATR bands; BUY/SELL marks on flips.
ATR-distance trailing stop that follows price; signal on direction change.
Ribbon of eight EMAs; ordered stacking marks a strong trend.
Conversion/base lines, forward-shifted cloud and lagging close.
Trend and RSI across 1h / 4h / 1D / 1W in one table.
Three Hull variants (HMA / EHMA / THMA) in one; slope-colored trend with turn markers.
Moving average that speeds up or slows down with market efficiency; flattens in chop, hugs price in trends. Efficiency label on the last bar.
Parabolic stop-and-reverse dots; optional 200 EMA filter keeps only with-trend flips.
Cross of any two of seven MA types (EMA, SMA, WMA, HMA, RMA, VWMA, ALMA); shaded zone, golden/death cross marks.
Least-squares line over the last N bars with deviation bands; slope and Pearson R (how clean the trend is) in a label.
Trend freshness from the time since the last high and low; up/down lines plus oscillator.
Ratio of positive vs negative trend movement; line crosses mark trend starts.
Chart SuperTrend plus a higher-timeframe SuperTrend (non-repainting); signals only when both timeframes agree.
Step-like trend line and bands that filter noise by the average move range; one signal per direction change.
Lag-corrected EMA with a volatility band; trend flips when price breaks the band, plus in-trend re-entry marks.
Trend line that walks below or above price by an ATR distance depending on CCI's sign, never stepping back.
State-estimation filter smoothing price: separate responsiveness and noise settings; low lag, slope-colored direction.
Slope of ten EMAs of different lengths and price's position in one score (−100…+100); beyond ±60 is a strong trend.
Squeeze when Bollinger sits inside Keltner; momentum direction on release.
Wave oscillator from channel deviation; cross dots in extreme zones.
Draws bullish/bearish divergences between RSI and price.
Four-color histogram with above/below-zero cross marks.
Stochastic RSI; K/D crosses in extreme zones are marked.
Trend strength (ADX) and direction (+DI / −DI); strong-trend threshold.
Scans six oscillators (RSI, MACD, Stochastic, CCI, OBV, MFI) for divergence at once; the agreeing count is printed on price.
Volatility band trailing a smoothed RSI; direction flips when RSI breaks the band — a noise-resistant momentum signal.
Commodity channel index with ±100 / ±200 zones, colored columns, signal line and exit-from-extreme marks.
Double-smoothed momentum; low-lag, low-noise with signal crosses and histogram.
Fast and slow percent-range oscillators together; when both sit at an extreme the exhaustion zone is shaded.
Transform that pushes price toward a normal distribution; sharper turning points with trigger-line crosses.
Percent rate of change with signal average, colored histogram and zero crosses.
Weighted sum of four rate-of-change horizons; captures longer momentum cycles.
How many standard deviations price is from its mean; beyond ±2 is stretched, marks on the return inside.
Buyer and seller strength: distance of high and low from an EMA; read with the EMA slope for pullback entries.
%K/%D with overbought/oversold zones; signals only on crosses INSIDE the zones (less noise).
MACD from any timeframe you choose (empty = chart); four-color histogram, signal and zero crosses.
Chart RSI with a higher-timeframe RSI; 40/60 regime zones (bull markets hold RSI 40) and signals when timeframes agree.
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.
Fast cycle oscillator applying a stochastic to MACD twice; 25/75 crosses turn earlier than MACD.
Weighted average of two long-horizon rates of change; an upturn below zero marks major bottoming zones (weekly/monthly).
Weighted ratio of buying pressure over three horizons (7/14/28); reduces the false signals of single-period oscillators.
Difference of 5- and 34-period averages of the bar midpoint; colored histogram, acceleration line and zero crosses.
Bollinger Bands; background marks when width is in its narrowest 10%.
EMA center with ATR bands; closes outside the channel are highlighted.
Exit level an ATR multiple away from the highest/lowest close.
Noise-reducing averaged candles in a separate pane.
Two layers of ATR bands around an EMA; outer-band touches flag stretch, returns inside flag pullbacks.
Annualized historical volatility and its percentile rank; low-vol (pre-expansion) and high-vol regimes are shaded.
Is the market trending or chopping? Above 61.8 is choppy, below 38.2 is strongly trending.
Highest high and lowest low of N bars; trend flips on channel breaks, midline colored by trend.
Price position inside the bands (%B) and bandwidth percentile; narrow bands (squeeze) are shaded.
1σ/2σ/3σ bands, squeeze dots and 'walking the band' detection (consecutive closes outside = strong trend).
Expected ±1 and ±2 move range for this period, from the prior period's close and ATR (non-repainting).
Session/week/month-anchored VWAP with two standard-deviation bands.
Volume relative to its average; spikes above the threshold are highlighted.
Volume by price over the last N bars (right-aligned); POC and value area.
On-balance volume with signal average and OBV breakouts — catches volume breaking out before price does.
Volume-weighted accumulation/distribution balance from where each close sits in its range; above zero is buying pressure.
Volume-weighted RSI: above 80 overbought, below 20 oversold; marks on exits from the zones.
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.
Volume-weighted average price anchored to session, week, month, quarter, year or a time you choose; ±1 and ±2 deviation bands.
Volume at multiples of its average; wide-range climax bars and narrow-range high-volume absorption bars in distinct colors.
Daily, weekly and monthly VWAP at once; alignment marks when price is above or below all three.
Cumulative accumulation/distribution line with a signal average; moves against price reveal hidden buying/selling.
How far price moves per unit of volume; above zero rises easily, below falls easily (volume normalized).
Colors candles by how statistically extreme their volume is (low → extreme); extreme bars are marked.
Swing points (HH, HL, LH, LL), break of structure (BOS) and change of character (CHoCH).
Three-candle price imbalances (FVG); removed once filled.
A swing high/low taken by a wick with the close back inside (liquidity grab).
Trendlines auto-drawn through the last two lower highs and higher lows.
The last opposite candle before a break of structure is boxed; the box is removed once price trades through it (close or wick).
Labels swing highs/lows as HH, HL, LH, LL, joins them with a zigzag; corner panel shows the current structure (rising / falling / mixed).
Nearly equal highs/lows (liquidity pools) are linked and tagged EQH / EQL; tolerance scales with ATR.
The last N bars' range is split into premium (top), equilibrium (middle) and discount (bottom); price's position in the range is printed.
A strong impulse (ATR multiple) after a small-bodied base candle draws a supply/demand zone; removed once price trades through.
A swing level breaks, price comes back to test it and holds — then a signal; the level and break are drawn.
Percent- or ATR-threshold zigzag; each leg shows its percent change and bar count, average leg size in a table.
Support and resistance from pivots; the newest N levels are kept.
Classic, Fibonacci or Camarilla pivots from the previous period's H/L/C.
Automatic Fibonacci retracement levels from the last N bars' high/low.
Asia, London and New York sessions as boxes (intraday timeframes only).
Previous day, week and month highs/lows (non-repainting); labeled by name on the last bar.
High/low of each session's first N bars; marks on breakout plus a 1× range target line.
Psychological round levels with an automatic step from price magnitude; major levels drawn bold.
Extension targets 1.272 · 1.618 · 2 · 2.618 from the last swing leg (low→high or high→low); automatic direction.
Day, week and month opening prices; whether price is above or below the open summarizes the period's direction.
Average daily range (ADR): +ADR from the day's low and −ADR from its high, and how much of today's ADR is used (intraday).
Direction of eight indicators (RSI, MACD, Stochastic, ADX/DI, EMA stack, SuperTrend, Bollinger, MFI) plus a total score in one table; trend row across three timeframes.
Engulfing, hammer, shooting star, doji, morning/evening star, inside bar, three soldiers/crows — with an optional trend-context filter.
Position size from account size and risk per trade; ATR, percent or swing stop; 1R/2R/3R targets on chart and in a table. A calculator, not investment advice.
Table of average return, win rate and sample size for each weekday, computed from the chart's history.
Enter up to five price levels in settings; they're drawn on the chart with up/down cross alerts ready for each (0 = off).
Alerts without code: A (price, EMA, RSI, MACD, Stochastic, volume) · condition (crosses up/down, greater/less) · B (a number or another series). Mark + alert when true.
Market at a glance: N-bar change, ATR %, last bar range/ATR, volume ratio, distance to EMA50/200, distance to 100-bar high/low, RSI and trend.
On intraday charts: average return and win rate for each hour (UTC) from the chart's history — which hours are strong or weak.
EMA-cross entries with ATR-based stop and reward/risk target.
Buys RSI oversold with a trend filter, exits on reversion to the mean.
Enters on an N-bar channel breakout, exits on the opposite shorter channel (trend following).
Entries on SuperTrend flips, trailing stop on the SuperTrend line and an optional R-multiple target; backtest includes commission.
MACD crosses only in the direction of the long-term trend; with ATR stop and target.
Buy when a close returns inside after dipping below the lower band, exit at the basis; ATR disaster stop.
Enters in the momentum direction when Bollinger bands leave the Keltner channel (squeeze release); trailing ATR stop.
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.
Enter on a 55-bar channel breakout, exit on the opposite 20-bar channel; 2 ATR protective stop. Classic trend following.
Enter/reverse on Hull moving average direction changes; optional long-only mode and ATR stop.
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.)
Buy after N consecutive higher closes, sell after N consecutive lower closes.
After an inside bar, place stop orders at its high/low for the breakout.
An outside bar (exceeds the prior range both ways) closing up is a buy, closing down a sell.
Buy a break of the upper Keltner band, sell a break of the lower; exit at the middle line.
Buy when momentum and momentum-of-momentum are above zero, sell when below.
Buy when price crosses above its moving average, sell when it crosses below.
Buy when the fast average crosses above the slow one, sell when it crosses below.
Stop-and-reverse on Parabolic SAR flips.
Fade new pivot highs (short) and new pivot lows (long).
Buy a break above the last pivot high, sell a break below the last pivot low.
Buy a break of the N-bar high, sell a break of the N-bar low.
Buy when slow %K crosses above %D in oversold, sell when it crosses below in overbought.
Enter in the direction of a close beyond the prior close ± k·ATR (volatility expansion).
With ADX above a threshold, buy +DI crossing above −DI and sell the opposite cross.
Buy CCI crossing up through −100, sell CCI crossing down through +100.
Buy %R crossing up through −80, sell crossing down through −20.
Buy MFI crossing up through 20, sell crossing down through 80.
Long when three EMAs are stacked fast > mid > slow, short when inverted; exit when the stack breaks.
Above the cloud buy a Tenkan/Kijun bullish cross; below it sell the bearish cross.
Fade moves k standard deviations away from VWAP, exit back at VWAP.
Enter reversals when the Fisher Transform crosses its trigger in extreme zones.
Buy when the Heikin Ashi candle turns green, sell when it turns red.
Buy when the z-score drops below −2, sell above +2; exit at zero.
Buy a close k ATR above the average, sell k ATR below; exit at the average.
Buy when both the EMA and the MACD histogram rise, sell when both fall.
Buy when Aroon Up crosses above Aroon Down, sell the opposite.
Trade a breakout of the first N bars of the UTC day; flat at the end of the day.
Accuracy and privacy
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.
Scripts run in a sandboxed Web Worker on your device and are saved only in this browser. We never upload them.