Skip to main content

Scalp Pattern Spot Trading Strategy

Scalp Pattern is a spot strategy that trades bullish engulfing-style candle patterns. It looks for a strong bullish candle that breaks above a recent bearish candle, then manages the position with a compact target, an optional protective stop, a bearish-pattern exit, and a maximum-hold timer.

Scalp Pattern Spot Trading Strategy strategy behavior

The strategy can restrict entries to specific UTC windows. Its defaults focus on the first and last hour of the UTC day and use a long cooldown to avoid repeatedly trading nearby patterns.

warning

The default SPT_MAX_HOLD_MS is one minute while the default candle period is 15 minutes. The timer does not force a loss: after one minute it only exits if the position has reached the minimum profitable price.

Trading behavior

Scalp Pattern evaluates the current candle against recent candles of the opposite color. A bullish candle is called white and a bearish candle dark.

Bullish entry pattern

The current candle must:

  1. Close at or above its open.
  2. Have a body at least SPT_MIN_BODY_PCT percent of its close.
  3. Break above the high of a qualifying recent bearish candle.
  4. When body engulfing is required, fully cover that bearish candle's body.

The strategy searches up to SPT_OPPOSITE_LOOKBACK previous candles for the most recent bearish candle whose body also meets the minimum size.

The bullish current candle always has to break the older candle's high, including its wick. Disabling SPT_REQUIRE_BODY_ENGULF only removes the additional body-coverage requirement.

An entry also needs:

  • No existing position large enough to manage.
  • Spread within both configured limits.
  • An open entry window when time filtering is enabled.
  • No manual news block.
  • Enough unreserved balance and a valid order size.
  • No open order and no active cooldown.

The strategy makes one buy. It does not add to the position.

tip

Increasing the opposite lookback does not require the immediately previous candle to be bearish. It lets the current candle compare with the newest qualifying bearish candle anywhere inside the search window.

Target

In percentage mode, the target is average entry plus SPT_TARGET_PCT. In pip mode, it is entry plus SPT_TARGET_PIPS × SPT_PIP_SIZE.

The final target cannot fall below the price needed to cover estimated round-trip fees plus SPT_MIN_NET_GAIN_PCT.

Bearish engulf exit

The bearish pattern mirrors the entry:

  • The current candle is bearish and large enough.
  • It breaks below the low of a recent qualifying bullish candle.
  • With body engulfing required, it also covers that candle's body.

When SPT_EXIT_ON_BEARISH_ENGULF is enabled, this pattern may close an open position. It only does so after the position has reached the minimum profitable exit price.

Maximum-hold exit

Once SPT_MAX_HOLD_MS has elapsed since the buy, Scalp Pattern becomes willing to take a time exit. This is not an unconditional timeout: it still waits until the bid reaches the minimum fee-aware profitable price.

The timer therefore limits how long the strategy waits for the full target after a small profit is available. It does not cap how long a losing position can remain open.

Protective stop

When SPT_USE_PROTECTION is enabled, the strategy may close below break-even at:

  • SPT_STOP_PCT below average entry in percentage mode.
  • SPT_STOP_PIPS × SPT_PIP_SIZE below entry in pip mode.

Without protection, target, bearish-pattern, and time exits are all profit protected.

Time window, news block, and cooldown

SPT_ENTRY_WINDOWS_UTC accepts comma-separated HH:MM-HH:MM ranges. The defaults allow entries from midnight through 01:00 UTC and from 23:00 through 23:59 UTC.

These windows affect entries only. Open positions continue to be managed outside them.

The news block is manual and also affects entries only.

SPT_COOLDOWN_MS applies between actions. With its 15-minute default, a completed buy or sell prevents another strategy order for 15 minutes. SPT_ENFORCE_COOLDOWN_IN_BACKTEST determines whether historical tests model that wait.

Good market conditions

Scalp Pattern is best suited to liquid sessions where a large reversal candle has meaning:

  • A short bearish move or rejection is followed by a decisive bullish candle.
  • The bullish body and break above the earlier high show real follow-through.
  • Spread remains very small compared with the target.
  • The chosen time window contains dependable activity for the pair.

It is a weaker fit for:

  • Thin markets where one trade creates an oversized candle.
  • Sideways noise producing alternating candles with little follow-through.
  • Strong downtrends where a single bullish engulf is only a pause.
  • Pairs whose normal spread is close to the 0.04% default maximum.

The pattern has no long-term trend filter. Backtesting should include bearish regimes, not only sessions where engulfing reversals worked.

How to create a Scalp Pattern strategy

  1. Create a new spot strategy in the advanced strategy editor.
  2. Select scalppattern as both buy and sell method.
  3. Start with the default 15-minute candle period.
  4. Set both trading-limit controls to the intended single-order value.
  5. Verify the absolute spread limit is meaningful for the pair's price scale.
  6. Translate your intended sessions to UTC.
  7. Backtest with cooldown enforcement enabled.
  8. Compare protection on and off over falling as well as ranging markets.

A practical tuning workflow

Start by confirming that the pattern itself is selective:

  • Raise minimum body percent to ignore small candles.
  • Reduce opposite lookback to focus on the most recent context.
  • Keep body engulfing enabled when wick breaks alone create too many signals.

Then evaluate execution. An absolute spread value such as 0.0001 means very different things on different pairs. Use the percentage limit as the transferable control and set the absolute limit deliberately for each quotation, or set it to 0 to rely on percentage alone.

Tune target and timer together. A short maximum hold with a high minimum net gain may rarely produce time exits. A long timer makes the strategy wait longer for the full target before accepting the smaller profitable exit.

Finally, test the entry windows. Crypto trades continuously, so the UTC-day boundaries do not inherently have the same meaning as a forex session open or close.

Core settings

LabelConfig parameterDefaultDescription
Buy enabledBUY_ENABLEDtrueAllows new bullish-pattern entries.
Sell enabledSELL_ENABLEDtrueAllows target, timed, bearish-pattern, and protective exits.
PeriodPERIOD15Candle period in minutes. Pattern shapes change materially with timeframe.
Trading limitTRADING_LIMIT100Compatibility fallback only. It is ignored while the strategy-specific trading limit is positive; the two values do not need to match. For USDT-BTC, this value is in USDT.
Funds reserveFUNDS_RESERVE0For USDT-BTC, the amount of USDT the bot must leave unused.
Amount retained from sellsKEEP_QUOTE0For USDT-BTC, the amount of BTC the strategy must not sell.
Min volume to buyMIN_VOLUME_TO_BUY10General minimum buy value. Keep it aligned with SPT_MIN_ORDER_VALUE. For USDT-BTC, this value is in USDT.
Min volume to sellMIN_VOLUME_TO_SELL10General minimum sell value. Keep it aligned with SPT_MIN_SELL_VALUE. For USDT-BTC, this value is in USDT.
GainGAIN0.25General target value. Keep the intended target explicit in SPT_TARGET_PCT.

Execution settings

LabelConfig parameterDefaultDescription
SPT trading limitSPT_TRADING_LIMIT100For USDT-BTC, the amount of USDT used for the single entry.
SPT min order valueSPT_MIN_ORDER_VALUE10Minimum value required for a buy. For USDT-BTC, this value is in USDT.
SPT min sell valueSPT_MIN_SELL_VALUE10Minimum position value required for a sell. For USDT-BTC, this value is in USDT.
SPT cooldown msSPT_COOLDOWN_MS900000Minimum milliseconds between actions. 900000 is 15 minutes.
Enforce cooldown in backtestSPT_ENFORCE_COOLDOWN_IN_BACKTESTtrueIncludes the action cooldown in historical tests. Keep enabled for behavior closer to live trading.
SPT max spread %SPT_MAX_SPREAD_PCT0.04Maximum bid/ask spread as a percentage of midpoint.
SPT max spread absoluteSPT_MAX_SPREAD_ABSOLUTE0.0001Maximum spread in pair price units. Set 0 to disable this second limit. When enabled, both limits must pass. For USDT-BTC, this value is in USDT.

Pattern and time-window settings

LabelConfig parameterDefaultDescription
Use time windowSPT_USE_TIME_WINDOWtrueRestricts new entries to the configured UTC windows.
Entry windows UTCSPT_ENTRY_WINDOWS_UTC00:00-01:00,23:00-23:59Comma-separated entry windows in UTC.
Opposite lookbackSPT_OPPOSITE_LOOKBACK3Number of previous candles searched for a qualifying candle of the opposite color.
Require body engulfSPT_REQUIRE_BODY_ENGULFtrueRequires the current body to cover the older candle's body. The break beyond its wick is always required.
Min body %SPT_MIN_BODY_PCT0.02Minimum body size as a percentage of close for both current and comparison candles.

Targets, stop, and position timing

LabelConfig parameterDefaultDescription
Use pipsSPT_USE_PIPSfalseUses pip target and stop distances instead of percentages.
Pip sizeSPT_PIP_SIZE0.0001Pair-price value of one pip. For USDT-BTC, this value is in USDT.
Target pipsSPT_TARGET_PIPS6Profit distance in pip mode.
Stop pipsSPT_STOP_PIPS6Protective distance in pip mode.
Target %SPT_TARGET_PCT0.5Profit target above average entry in percentage mode.
Minimum net gain %SPT_MIN_NET_GAIN_PCT0.3Minimum gain above estimated fee-adjusted break-even for target, time, and pattern exits.
Stop %SPT_STOP_PCT0.25Protective distance below average entry in percentage mode.
Use protectionSPT_USE_PROTECTIONfalseAllows a planned sell below break-even at the stop.
Max hold msSPT_MAX_HOLD_MS60000Time after entry before a smaller profitable time exit becomes eligible. It does not force a loss.
Exit on bearish engulfSPT_EXIT_ON_BEARISH_ENGULFtrueAllows a bearish engulfing pattern to sell after minimum profitable price is available.

News and backtesting settings

LabelConfig parameterDefaultDescription
News blockSPT_NEWS_BLOCKfalseManually pauses new entries.
News block untilSPT_NEWS_BLOCK_UNTIL0Timestamp until which entries remain blocked.
Backtest sinceBF_SINCE0Optional backtest start boundary.
Backtest untilBF_UNTIL0Optional backtest end boundary.
Deep testingDEEP_TESTINGfalseEnables Gunbot's deeper backtesting mode without changing live signals.

Important limitations

  • The strategy opens one position and does not DCA.
  • It has no broader trend filter.
  • The time exit never forces a loss.
  • The bearish engulf exit never forces a loss.
  • Only enabled protection can make a planned loss exit.
  • Time and news filters affect entries only.
  • The absolute spread limit must be chosen for the pair's price scale.

Use the pattern rules to find meaningful candle transitions, but judge the strategy by what happens after entry. A visually impressive engulfing candle is only useful if the following movement can cover spread, fees, and the requested gain.