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.

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)
| Input | Default | Purpose |
|---|---|---|
| Stop loss | 0.02 | Stop distance as a fraction of average entry (2%) |
| Trade Start / Stop Date | 2023-01-01 / 2025-01-01 | Allowed trading window |
| sourceUuid / secretToken | placeholders | Bot alert placeholders |
| default_qty_value | 50 | 50% of equity per entry |
| pyramiding | 1 | At most one concurrent long |
| commission_value | 0.1 | Commission percent |
| slippage | 5 | Slippage 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
- Download the .pine file from Coinpred (active membership required, see below), or check the original page for the latest version.
- Open the Pine Editor on TradingView, create a blank script, paste the full source and save.
- Click Add to chart; start with BTCUSDT 4-hour so you can compare with the author image.
- Move Trade Stop Date forward as needed, then tune Stop loss and position size for your risk.
- 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.