Skip to main content
ATK Pine Script®

Strategy Examples

Execution pattern examples — order types, bracket exits, trailing stops, RSI filters, and parameterized strategy templates.

Order Type Examples#

These patterns assume you already understand mapped execution fields and the separation between signal building and trade mapping.

ExampleWhat it teachesDownload
pynescript_strategy_starter.pyBaseline MARKET mapped entry flow.Download
pynescript_limit_entry_strategy.pyLIMIT entries with mapped_entry_limit_price.Download
pynescript_stop_market_entry_strategy.pySTOP_MARKET entries with mapped_entry_trigger_price.Download
pynescript_stop_limit_entry_strategy.pySTOP_LIMIT entries with trigger and limit fields kept explicit.Download
pynescript_reduce_only_exit_strategy.pymapped_reduce_only plus IOC exit-management intent.Download
pynescript_strategy_alert_template_strategy.pystrategy_alert_message(...) plus alert-friendly mapped tags.Download
pynescript_slippage_strategy.pyDeclaration-level slippage modeling.Download
pynescript_commission_strategy.pyFee modeling with commission_type and commission_value.Download
pynescript_margin_strategy.pyMargin and percent-of-equity sizing assumptions.Download
pynescript_pyramiding_strategy.pypyramiding add-on entry flow.Download
pynescript_limit_fill_assumption_strategy.pybacktest_fill_limits_assumption with explicit limit-entry design.Download

Pattern Variations#

Each file adds one idea. Bracket exits, trailing stops, RSI filters, and shared-core reuse are all easier to learn as separate variations.

FileWhat it demonstratesBest useDownload
pynescript_sma_crossover_strategy.pySMA crossover mapped strategy.Simple crossover template.Download
pynescript_bracket_strategy.pyBracket exits with mapped_sl and mapped_tp.Risk-managed entries.Download
pynescript_trailing_stop_strategy.pyTrailing stop with mapped_trail_offset.Trailing exit pattern.Download
pynescript_rsi_filter_strategy.pyRSI gating around a crossover entry system.Multi-signal filter pattern.Download
pynescript_utbot_strategy.pyUTBOT strategy using shared core helpers.Core reuse pattern.Download
pynescript_utbot_strategy_full.pyUTBOT strategy with explicit trade quantity input.Parameterized strategy template.Download