Skip to main content
ATK Pine Script®
Back to Docs

Examples Browser

Browse, preview, and download PyneScript V6 example scripts. Each example is a standalone Python file ready to use in ATK.

Indicator Starter

Starters

indicator, input.int, input.source, ta.rsi, hline.

.py

Strategy Starter

Starters

EMA crossover, mapped execution fields, build_mapped_trade_frame.

.py

Visual Indicator Starter

Starters

plot, plotshape, hline, static frame.attrs payload for box/label/line.

.py

RSI Indicator

Indicators

RSI sub-panel with safe source fallback.

.py

Histogram Sub-Panel

Indicators

ATK histogram rendering in sub-panel.

.py

MACD Sub-Panel

Indicators

MACD plus histogram colors.

.py

KDJ Oscillator

Indicators

K, D, J oscillator with threshold lines.

.py

Stochastic Oscillator

Indicators

Dual-line stochastic oscillator.

.py

StochRSI

Indicators

StochRSI with source handling.

.py

Volume with MA

Indicators

Volume histogram plus moving average in sub-panel.

.py

SuperTrend Indicator

Indicators

SuperTrend with ATR-based trend detection.

.py

SuperTrend Color Line

Indicators

SuperTrend with color-coded trend line.

.py

Murrey Math Lines V2

Indicators

Murrey Math Lines with support/resistance levels.

.py

Input Interactions

Indicators

Extended input family, confirm metadata, time/price pairing.

.py

Barstate & Log

Indicators

barstate.from_index plus log.info/log.warning.

.py

Plot Visual Surface

Indicators

plotbar, plotchar, plotarrow, barcolor, bgcolor.

.py

Native Table

Indicators

Native table.new, table.cell, and ctx.table.new.

.py

Request Seed Runtime

Indicators

request.seed with inline structured seeded data.

.py

Map Runtime

Indicators

map.new, map.put, map.get, map.keys, map.size.

.py

Matrix Runtime

Indicators

matrix.new, row/col reads, simple 2D aggregation.

.py

Bollinger Bands Fill

Indicators

Plots plus linefill.new for band visualization.

.py

SMA Crossover Strategy

Strategies

SMA crossover mapped strategy.

.py

EMA + ATR Strategy

Strategies

EMA and ATR combined test strategy.

.py

Bracket Strategy

Strategies

Bracket exits with mapped_sl and mapped_tp.

.py

Trailing Stop Strategy

Strategies

Trailing stop with mapped_trail_offset.

.py

RSI Filter Strategy

Strategies

RSI gating around a crossover entry system.

.py

Limit Entry Strategy

Strategies

LIMIT entries with mapped_entry_limit_price.

.py

Stop Market Entry

Strategies

STOP_MARKET entries with mapped_entry_trigger_price.

.py

Stop Limit Entry

Strategies

STOP_LIMIT entries with trigger and limit fields.

.py

Reduce-Only Exit

Strategies

mapped_reduce_only plus IOC exit-management.

.py

Slippage Strategy

Strategies

Declaration-level slippage modeling.

.py

Commission Strategy

Strategies

Fee modeling with commission_type and commission_value.

.py

Margin Strategy

Strategies

Margin and percent-of-equity sizing.

.py

Default Quantity

Strategies

Default quantity and sizing defaults.

.py

Pyramiding Strategy

Strategies

Pyramiding add-on entry flow.

.py

Limit Fill Assumption

Strategies

backtest_fill_limits_assumption with limit-entry design.

.py

MTF Confirmation

Strategies

request.security with lambda and HTF trend confirmation.

.py

Alert Strategy

Strategies

Alert calls and alert-friendly trade metadata.

.py

Strategy Alert Template

Strategies

strategy_alert_message plus alert-friendly mapped tags.

.py

Strategy Intent Surface

Strategies

strategy.entry/order/exit/close/cancel payload helpers.

.py

MT5 GTD Pending

Strategies

Good-till-date pending order strategy for MT5.

.py

UTBOT Strategy

Strategies

UTBOT strategy using shared core helpers.

.py

UTBOT Strategy Full

Strategies

UTBOT with explicit trade quantity input.

.py

ATK Plot Fill Bridge

Visuals

ctx.atk.plot_line with ctx.atk.fill_between.

.py

ATK Shape Zone Bridge

Visuals

Shape text, polyline, rectangles, rectangle ray.

.py

ATK Table Bridge

Visuals

Dashboard table using ctx.atk.table.

.py

ATK Profile Candle Bridge

Visuals

Composite visuals with candles and horizontal profile bars.

.py

Plot Shape Above

Visuals

Conditional plotshape above bar.

.py

Plot Shape Below

Visuals

Conditional plotshape below bar.

.py

Color Text Overlay

Visuals

Styled text overlays with color, size, font, weight.

.py

Color Line Text

Visuals

Line-text bundles with ATK bridge.

.py

Color Arrow

Visuals

Directional arrows with per-row direction and color.

.py

Chart Point Showcase

Visuals

chart.point, line, label, box, polyline APIs.

.py

Visual Settings Lifecycle

Visuals

Object creation and mutation lifecycle across line, box, fill.

.py

Candlestick

Visuals

Simple plotcandle declaration.

.py

Color Candlestick

Visuals

Color-per-bar candle rendering.

.py

Candlestick Sub-Chart

Visuals

Candles in a sub-panel via ATK bridge.

.py

Volume Profile Fixed Range

Visuals

Volume profile payload and value-area rendering.

.py

Volume Profile with Rectangle

Visuals

Profile variant with rectangle integration.

.py

Library Publish V1

Libraries

Versioned library publishing pattern (v1).

.py

Library Publish V2

Libraries

Versioned library publishing pattern (v2).

.py

Library Import Indicator

Libraries

Selective import from published library.

.py

Library Enum Utils

Libraries

Versioned library with enum exports.

.py

Library Enum Import

Libraries

Enum exports and selective import binding.

.py

Library Signal Utils

Libraries

Shared signal utility library.

.py

Library Upgrade Indicator

Libraries

Library version upgrade pattern.

.py

UTBOT Indicator

Advanced

UTBOT indicator with ATK arrow rendering.

.py

SMC Framework

Advanced

Advanced SMC framework using smart-money concepts.

.py

SMC ICT Confluence

Advanced

ICT-style confluence with summary table.

.py