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

AO/AC Trading Zones for Bitcoin: Alligator and Fractal Filter with Up to Five Adds

An open-source (MPL 2.0) long-only Skyrexio strategy that builds AO/AC “trading zone” signals, filters with Williams Alligator teeth plus fractals and a 100-period EMA, and can pyramid up to five longs. Includes the author’s BTCUSDT 4-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-30 · Trend following
AO/AC Trading Zones for Bitcoin: Alligator and Fractal Filter with Up to Five Adds

The idea

This is a long-only Bill Williams–style trend system. Awesome Oscillator (momentum) and Acceleration/Deceleration (acceleration) are stacked into “trading zone” signals; Williams Alligator teeth and fractals approximate the short-term trend; a longer EMA keeps counter-trend trades out.

Unlike a single in-and-out design, the source allows up to five layered entries while the setup remains valid. Exits come from a trend flip or from a stop level recorded when the zone strengthens. It is a Pine Script v6 strategy(), ready for the Strategy Tester.

Author chart of the AO/AC Trading Zones strategy on BINANCE:BTCUSDT 4-hour, with entries and Buy More labels
Author showcase: BINANCE:BTCUSDT, 4-hour chart, taken from the publication page. Long entries and “Buy More” add-on labels are visible; the image only shows what the UI looks like and is not a Coinpred backtest.

Indicators

  • AO: SMA(hl2, 5) − SMA(hl2, 34). AC: AO − SMA(AO, 5). Rising AO and AC together feed a “green bar” counter.
  • Williams fractals: pivot high/low with two bars on each side, used to refresh upper and lower fractal levels.
  • Alligator teeth: 8-period SMMA of hl2, shifted forward by 5 bars. Fractal breaks relative to teeth mark trend as +1 or −1.
  • Filter EMA: 100-period EMA of the close by default; green bars and entries require the close above it.
  • qtyGreenBars: increments when close > teeth, AC is rising, AO is rising and close > filter EMA; otherwise resets to zero.

Entry rules

  • Long only; up to five stacked entries (entry1…entry5, pyramiding = 5).
  • When open trades are 0–4, if the close is above the prior close, qtyGreenBars is between 2 and 6 inclusive, and time is inside the trading window, another long is opened.
  • Default size is 10% of equity per entry, with 0.1% commission and slippage set to 5.
  • Logic runs on bar close (calc_on_every_tick = false); Strategy Tester fill timing still follows TradingView defaults.

Exits and position sizing

  • When qtyGreenBars equals 5, the bar’s low is stored as stopLossLevel.
  • closeCondition is true when trend flips from +1 to −1, or when low breaks stopLossLevel. Either case calls strategy.close_all.
  • There is no fixed take-profit multiple; gains rely on trend continuation and adds, while risk relies on the trend flip or that stop level.
  • Inputs sourceUuid / secretToken plus JSON alert templates support the author’s bot hooks. Coinpred ships the source unchanged and does not fill those fields for you.

Inputs (source defaults)

InputDefaultPurpose
EMA Length100Length of the long-term filter EMA
Trade Start / Stop Date2023-01-01 / 2026-01-01Allowed trading window
sourceUuid / secretTokenplaceholdersBot alert placeholders
default_qty_value1010% of equity per entry
pyramiding5Up to five concurrent longs
commission_value0.1Commission percent
slippage5Slippage in ticks

Things to know before using it

  • It is long-only; there is no short branch.
  • Add-on rules nearly match the first entry, so exposure can grow quickly in a strong trend—size total risk before live use.
  • The stop is the low of the bar where green bars hit 5; it is not guaranteed to sit on a clean structure low, and gaps can widen the fill.
  • Fractal confirmation lags by two bars on each side, so trend marks appear after extremes.
  • The author chart is BTCUSDT on 4 hours. Backtest other markets or timeframes on their own and consider re-tuning the EMA 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. You should see Alligator-related lines and “Buy More” labels when adds fire.
  4. Check the defaults against the table above, then adjust the EMA and trading window for your market.
  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: AO/AC Trading Zones 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/Tkrjao7P-AO-AC-Trading-Zones-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 showcase”.
  • 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.