NEWCard payments are live · from $18/month, USDT also acceptedSee plans
COINPRED / STRATEGY LIBRARY

Bitcoin KST Strategy: Alligator and MA Filter with ATR Stops

An open-source (MPL 2.0) Skyrexio long-only trend strategy that enters on a Know Sure Thing signal-line crossover filtered by Alligator jaw, a long-term MA and an optional Choppiness Index, then locks ATR-based stop and take-profit levels. Includes the author’s BTCUSDT 1-hour chart and an inputs guide. No invented backtest figures.

Illustrated guidesPine Script®Included with monthly & annual plans
← All strategies
Skyrexio · 1.0 · 2026-10-31 · Trend following
Bitcoin KST Strategy: Alligator and MA Filter with ATR Stops

The idea

This long-only system treats Know Sure Thing (KST) as the main momentum switch. KST stacks four smoothed ROC legs with rising weights, then compares that sum with its own signal line. A crossover only matters when price is also above the Alligator jaw and the long-term filter MA.

An optional Choppiness Index blocks entries when the market looks too entangled—on by default. At signal time the script locks ATR-based stop and take-profit distances, then exits when high or low tags those levels. It is Pine Script v6 strategy() code with use_bar_magnifier enabled.

Author chart of the KST strategy on BINANCE:BTCUSDT 1-hour with entries and filter MA
Author chart: BINANCE:BTCUSDT, 1-hour timeframe, taken from the publication page. Long entries and the filter MA are visible; the image only shows what the UI looks like and is not a Coinpred backtest.

Indicators

  • KST: four smaroc(ROC length, SMA length) legs weighted 1/2/3/4; the signal is an SMA of KST with length siglen (default 9).
  • Default ROC/SMA pairs: 10/10, 15/10, 20/10, 30/15.
  • Alligator jaw: smma(hl2,13) shifted 8; entries require close above the jaw.
  • Filter MA: SMA/EMA/WMA/HMA/RMA/ALMA/Least Squares/VWMA; default is Least Squares MA (linear regression) length 200.
  • Choppiness Index: length 14 and threshold 50 by default; when enabled, CI must stay below the threshold.
  • ATR(14): when a long signal fires with no open trade, store stop as low − 1.5×ATR and take-profit as close + 3.5×ATR.

Entry rules

  • Long only; pyramiding = 1.
  • longSignal: KST crosses above its signal line, close is above the filter MA and the jaw, and the Choppiness condition passes.
  • strategy.entry also requires time inside the Trade Start/Stop window.
  • Default size is 60% of equity, with 0.1% commission and slippage set to 5.
  • calc_on_every_tick = false; use_bar_magnifier = true only affects Strategy Tester fill granularity.

Exits and position sizing

  • When high ≥ atrTakeProfit or low ≤ atrStopLoss, strategy.close(..., immediately = true) flattens entry1 at once.
  • Stop and take-profit levels refresh only on a signal while flat; they stay fixed for the open trade.
  • There is no trailing stop; reward uses the ATR take-profit multiple and risk uses the ATR stop multiple.
  • Bot alert placeholders remain in the source; Coinpred does not fill sourceUuid / secretToken for you.

Inputs (source defaults)

InputDefaultPurpose
ATR Stop Loss1.5Stop distance = multiple × ATR(14)
ATR Take Profit3.5Take-profit distance = multiple × ATR(14)
Filter MA Type / LengthLeast Squares MA / 200Long-term trend filter
Enable Choppiness / Threshold / Lengthtrue / 50 / 14Chop filter switch and parameters
KST ROC Lengths10 / 15 / 20 / 30Four ROC lookbacks
KST SMA Lengths10 / 10 / 10 / 15Smoothing for each ROC leg
KST Signal Line Length9SMA length of the KST signal
Trade Start / Stop Date2023-01-01 / 2025-05-01Allowed trading window
default_qty_value6060% of equity per entry

Things to know before using it

  • It is long-only; there is no short branch.
  • The default Trade Stop Date is 2025-05-01—extend it before testing after that date, or no new entries will fire.
  • Default sizing at 60% of equity is aggressive; lower it to match the drawdown you can tolerate.
  • Exits compare the bar’s high/low with locked levels and close immediately; gaps can widen the real fill versus the ideal price.
  • The author chart is BTCUSDT on 1 hour. Backtest other intervals or markets on their own and consider retuning the filter MA length.

Installing it on TradingView

  1. Download the .pine file from Coinpred (active membership required, see below), or check the original page for the latest version.
  2. Open the Pine Editor on TradingView, create a blank script, paste the full source and save.
  3. Click Add to chart; start with BTCUSDT 1-hour so you can compare with the author image.
  4. Extend Trade Stop Date, then tune ATR multiples, filter MA type and the Choppiness threshold as needed.
  5. Study signals and fills in the Strategy Tester before setting alerts. Past results do not guarantee future returns.

About backtest figures

Source, license and version

  • Author: Skyrexio. Original title: KST Strategy [Skyrexio]. Version 1.0 (pine-facade).
  • License: Mozilla Public License 2.0 (MPL 2.0). Coinpred provides the full, unmodified source.
  • Original page: https://www.tradingview.com/script/Pv1GvUVs-KST-Strategy-Skyrexio/
  • Pine version: v6; script type: strategy().
  • Images come from the author’s publication page, are not covered by the MPL, and are captioned “Author chart”.
  • Downloads are subject to Coinpred membership terms. If you modify the source file, the modified file must remain under MPL 2.0.

Source, license and version

Mozilla Public License 2.0 (MPL 2.0),© Skyrexio,依据源码头部许可声明。再分发须保留原版权与许可声明;如修改源码文件,修改后的文件仍须按 MPL 2.0 提供。Coinpred 未修改源码。 / Licensed under MPL 2.0 per the source header, © Skyrexio. Redistribution must keep the copyright and license notices; modified files must remain under MPL 2.0. Coinpred ships the unmodified source.

View original source ↗

Check the script license and your TradingView account features. Historical results do not guarantee future performance.