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

Bitcoin Momentum Alligator 4h: Daily Alligator Filter, AO Crossover Entries

An open-source (MPL 2.0) Skyrexio long-only trend strategy: enter when chart-timeframe AO crosses above its 5-period SMA while price sits above the daily Williams Alligator, and skip the next two signals after a winning trade. Includes the author’s BTCUSDT 4-hour chart and 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 Momentum Alligator 4h: Daily Alligator Filter, AO Crossover Entries

The idea

This is a long-only trend system aimed at the 4-hour chart. It waits for chart-timeframe momentum (Awesome Oscillator) to turn up again, and only opens when the daily Alligator already sits below price—so minor noise against the higher-timeframe trend is filtered out.

After a profitable closed trade the script skips the next two otherwise-valid signals, which is meant to cut down on choppy re-entries after a surge. It is Pine Script v5 strategy() code for the Strategy Tester. The publication text mentions Stochastic RSI, but the published source never calculates Stoch RSI; entries follow the AO and daily Alligator conditions in the code.

Author chart of the Momentum Alligator strategy on BINANCE:BTCUSDT 4-hour with trade markers
Author chart: BINANCE:BTCUSDT, 4-hour timeframe, taken from the publication page. Long entries and stop-related marks are visible; the image only shows what the UI looks like and is not a Coinpred backtest.

Indicators

  • Chart Alligator: jaw smma(hl2,13) shifted 8, teeth smma(hl2,8) shifted 5, lips smma(hl2,5) shifted 3; the jaw also feeds the dynamic stop.
  • Daily Alligator: the same three lines via request.security on "D"; entries require the close above daily jaw, teeth and lips.
  • AO: SMA(hl2,5) − SMA(hl2,34); ao_5sma is the 5-period SMA of AO.
  • skip_count: if the last closed trade’s profit is positive and the counter is 0, set it to 2; decrement each bar and block new entries while it is non-zero.
  • stopLossLevel: the higher of position average × (1 − stopLossPercent) and the chart-timeframe jaw.

Entry rules

  • Long only; pyramiding = 1, so at most one open trade.
  • longCondition: AO crosses above ao_5sma and close is above the daily jaw, teeth and lips.
  • Time must sit inside the Trade Start/Stop window and skip_count must be 0.
  • Default size is 50% of equity, with 0.1% commission and slippage set to 5.
  • calc_on_every_tick = true so the tester updates on ticks; live alerts still follow how you configure them.

Exits and position sizing

  • strategy.exit uses a dynamic stop=stopLossLevel; there is no separate fixed take-profit limit.
  • For longs, choosing the higher of the percentage stop and the jaw means a tighter protective price.
  • As the jaw rises with price, the stop can ratchet up; the percentage stop stays anchored to average entry.
  • sourceUuid / secretToken plus JSON alert templates support the author’s bot hooks. Coinpred ships the source unchanged and does not fill those fields.

Inputs (source defaults)

InputDefaultPurpose
Stop loss0.02Stop distance as a fraction of average entry (2%)
Trade Start / Stop Date2023-01-01 / 2025-01-01Allowed trading window
sourceUuid / secretTokenplaceholdersBot alert placeholders
default_qty_value5050% of equity per entry
pyramiding1At most one concurrent long
commission_value0.1Commission percent
slippage5Slippage in ticks

Things to know before using it

  • It is long-only; there is no short branch.
  • The default Trade Stop Date is 2025-01-01—extend it before testing or trading after that date, or no new entries will fire.
  • Where the publication blurb disagrees with the source (Stochastic RSI), trust the source and read longCondition yourself.
  • Default sizing uses 50% of equity; that can make drawdowns feel sharp—scale down to match your risk.
  • The author chart is BTCUSDT on 4 hours, which matches the strategy title; validate other markets or intervals separately.

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 4-hour so you can compare with the author image.
  4. Move Trade Stop Date forward as needed, then tune Stop loss and position size for your risk.
  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 (source header © Skyrex). Original title: Momentum Alligator 4h Bitcoin Strategy. 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/u31hDmOU-Momentum-Alligator-4h-Bitcoin-Strategy/
  • Pine version: v5; 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),© Skyrex(TradingView 发布账号 Skyrexio),依据源码头部许可声明。再分发须保留原版权与许可声明;如修改源码文件,修改后的文件仍须按 MPL 2.0 提供。Coinpred 未修改源码。 / Licensed under MPL 2.0 per the source header, © Skyrex (published under 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.