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.
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:
- Close at or above its open.
- Have a body at least
SPT_MIN_BODY_PCTpercent of its close. - Break above the high of a qualifying recent bearish candle.
- 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_PCTbelow average entry in percentage mode.SPT_STOP_PIPS × SPT_PIP_SIZEbelow 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
- Create a new spot strategy in the advanced strategy editor.
- Select
scalppatternas both buy and sell method. - Start with the default 15-minute candle period.
- Set both trading-limit controls to the intended single-order value.
- Verify the absolute spread limit is meaningful for the pair's price scale.
- Translate your intended sessions to UTC.
- Backtest with cooldown enforcement enabled.
- 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
| Label | Config parameter | Default | Description |
|---|---|---|---|
| Buy enabled | BUY_ENABLED | true | Allows new bullish-pattern entries. |
| Sell enabled | SELL_ENABLED | true | Allows target, timed, bearish-pattern, and protective exits. |
| Period | PERIOD | 15 | Candle period in minutes. Pattern shapes change materially with timeframe. |
| Trading limit | TRADING_LIMIT | 100 | Compatibility 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 reserve | FUNDS_RESERVE | 0 | For USDT-BTC, the amount of USDT the bot must leave unused. |
| Amount retained from sells | KEEP_QUOTE | 0 | For USDT-BTC, the amount of BTC the strategy must not sell. |
| Min volume to buy | MIN_VOLUME_TO_BUY | 10 | General minimum buy value. Keep it aligned with SPT_MIN_ORDER_VALUE. For USDT-BTC, this value is in USDT. |
| Min volume to sell | MIN_VOLUME_TO_SELL | 10 | General minimum sell value. Keep it aligned with SPT_MIN_SELL_VALUE. For USDT-BTC, this value is in USDT. |
| Gain | GAIN | 0.25 | General target value. Keep the intended target explicit in SPT_TARGET_PCT. |
Execution settings
| Label | Config parameter | Default | Description |
|---|---|---|---|
| SPT trading limit | SPT_TRADING_LIMIT | 100 | For USDT-BTC, the amount of USDT used for the single entry. |
| SPT min order value | SPT_MIN_ORDER_VALUE | 10 | Minimum value required for a buy. For USDT-BTC, this value is in USDT. |
| SPT min sell value | SPT_MIN_SELL_VALUE | 10 | Minimum position value required for a sell. For USDT-BTC, this value is in USDT. |
| SPT cooldown ms | SPT_COOLDOWN_MS | 900000 | Minimum milliseconds between actions. 900000 is 15 minutes. |
| Enforce cooldown in backtest | SPT_ENFORCE_COOLDOWN_IN_BACKTEST | true | Includes the action cooldown in historical tests. Keep enabled for behavior closer to live trading. |
| SPT max spread % | SPT_MAX_SPREAD_PCT | 0.04 | Maximum bid/ask spread as a percentage of midpoint. |
| SPT max spread absolute | SPT_MAX_SPREAD_ABSOLUTE | 0.0001 | Maximum 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
| Label | Config parameter | Default | Description |
|---|---|---|---|
| Use time window | SPT_USE_TIME_WINDOW | true | Restricts new entries to the configured UTC windows. |
| Entry windows UTC | SPT_ENTRY_WINDOWS_UTC | 00:00-01:00,23:00-23:59 | Comma-separated entry windows in UTC. |
| Opposite lookback | SPT_OPPOSITE_LOOKBACK | 3 | Number of previous candles searched for a qualifying candle of the opposite color. |
| Require body engulf | SPT_REQUIRE_BODY_ENGULF | true | Requires the current body to cover the older candle's body. The break beyond its wick is always required. |
| Min body % | SPT_MIN_BODY_PCT | 0.02 | Minimum body size as a percentage of close for both current and comparison candles. |
Targets, stop, and position timing
| Label | Config parameter | Default | Description |
|---|---|---|---|
| Use pips | SPT_USE_PIPS | false | Uses pip target and stop distances instead of percentages. |
| Pip size | SPT_PIP_SIZE | 0.0001 | Pair-price value of one pip. For USDT-BTC, this value is in USDT. |
| Target pips | SPT_TARGET_PIPS | 6 | Profit distance in pip mode. |
| Stop pips | SPT_STOP_PIPS | 6 | Protective distance in pip mode. |
| Target % | SPT_TARGET_PCT | 0.5 | Profit target above average entry in percentage mode. |
| Minimum net gain % | SPT_MIN_NET_GAIN_PCT | 0.3 | Minimum gain above estimated fee-adjusted break-even for target, time, and pattern exits. |
| Stop % | SPT_STOP_PCT | 0.25 | Protective distance below average entry in percentage mode. |
| Use protection | SPT_USE_PROTECTION | false | Allows a planned sell below break-even at the stop. |
| Max hold ms | SPT_MAX_HOLD_MS | 60000 | Time after entry before a smaller profitable time exit becomes eligible. It does not force a loss. |
| Exit on bearish engulf | SPT_EXIT_ON_BEARISH_ENGULF | true | Allows a bearish engulfing pattern to sell after minimum profitable price is available. |
News and backtesting settings
| Label | Config parameter | Default | Description |
|---|---|---|---|
| News block | SPT_NEWS_BLOCK | false | Manually pauses new entries. |
| News block until | SPT_NEWS_BLOCK_UNTIL | 0 | Timestamp until which entries remain blocked. |
| Backtest since | BF_SINCE | 0 | Optional backtest start boundary. |
| Backtest until | BF_UNTIL | 0 | Optional backtest end boundary. |
| Deep testing | DEEP_TESTING | false | Enables 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.