Levels GMMA Scalp Spot Trading Strategy
Levels GMMA Scalp is a spot strategy that trades around recent support and resistance while a slow Guppy Multiple Moving Average (GMMA) group confirms the broader direction.

It can buy a resistance breakout, a support bounce, or both. Every long entry also requires price above the slow GMMA band, with optional strict stacking of the individual averages.
warning
Support and resistance are based on recent extremes, not permanent price floors or ceilings. A break or bounce can fail, especially when volatility expands beyond the lookback range.
Trading behavior
Levels and ATR buffer
The strategy finds support from the lowest low and resistance from the highest high of the previous LGM_LEVEL_LOOKBACK candles. The current candle is excluded, so its movement cannot repaint the level it is being compared with.
An ATR-based buffer is added around those levels:
buffer = ATR × LGM_LEVEL_BUFFER_ATR
The buffer prevents a tiny touch from immediately counting as a break. Higher values demand more separation from the level.
GMMA filter
LGM_GMMA_SLOW_LENGTHS defines a comma-separated group of EMA lengths. Defaults are:
30,35,40,45,50,60
For a bullish setup, price must close above the highest EMA in the group.
With LGM_REQUIRE_GMMA_STACK enabled, each shorter EMA must also be at or above the next longer EMA. This requires an orderly bullish ribbon, not just price above a tangled group.
Keep lengths in ascending order. The stacking test follows the order entered in the setting.
Breakout entry
A resistance breakout requires:
- Previous close was not already beyond previous resistance plus its buffer.
- Current close moves above current resistance plus its buffer.
- GMMA is bullish.
Breakouts are allowed when LGM_ENTRY_MODE is breakout or both.
Support-bounce entry
A support bounce requires:
- Current low reaches support plus the ATR buffer.
- Current close finishes back above support plus the buffer.
- Current candle closes above its open.
- GMMA is bullish.
Bounces are allowed when entry mode is bounce or both. They are also allowed whenever LGM_ALLOW_SUPPORT_BOUNCE is enabled.
tip
With the defaults, entry mode is breakout but support bounce is enabled separately. The strategy therefore trades both breakout and bounce setups. Disable LGM_ALLOW_SUPPORT_BOUNCE for breakout-only behavior.
After a signal, spread, optional New York-time session, news, cooldown, and order checks must pass. The strategy buys once and does not DCA.
Entry plan: target and stop
The strategy saves a target and stop at entry.
The fixed target and stop use percentage distances or pip distances, depending on LGM_USE_PIPS.
When level target is enabled:
- A bounce targets just below resistance.
- A breakout targets resistance plus 23.6% of the recent support/resistance range.
The closer valid value between fixed and level target is used.
When level stop is enabled:
- A bounce uses just below support.
- A breakout uses just below the broken resistance.
The closer valid value between fixed and level stop is used. Level controls therefore tighten the plan; they do not automatically widen it.
Every target remains above fee-adjusted break-even plus LGM_MIN_NET_GAIN_PCT.
Signal exits
LGM_EXIT_ON_BEARISH_LEVEL allows an exit after either:
- A confirmed break below support, or
- A bearish rejection near resistance while price is below the GMMA average.
LGM_EXIT_ON_GMMA_FLIP allows an exit when price is below the entire slow band and, when required, the EMA group is bearishly stacked.
Both signal exits only sell at or above break-even.
Protection, session, and news
LGM_USE_PROTECTION activates the stored stop and allows a planned loss exit.
The optional session filter uses New York time. Its default window is 08:00-17:00; daylight-saving changes are handled automatically.
Session and manual news controls restrict entries only. Open positions remain managed.
Good market conditions
Levels GMMA Scalp is suited to:
- Trends with a clearly separated, bullish slow EMA ribbon.
- Well-tested support and resistance.
- Breakouts that close beyond a volatility-adjusted buffer.
- Pullbacks that hold support while the larger trend remains bullish.
It is weaker in:
- Flat markets with intertwined GMMA lines.
- Sudden volatility that invalidates recent levels.
- Thin markets where a wick defines an unreliable extreme.
- Downtrends where price briefly bounces but remains below the GMMA band.
The default five-minute period makes a 50-candle level cover roughly four hours. Changing period changes the meaning of both levels and EMA lengths.
How to create the strategy
- Create a new spot strategy in the advanced strategy editor.
- Select
levelsgmmascalpas both buy and sell method. - Start with the default five-minute period.
- Align both trading-limit settings.
- Decide whether you want breakout, bounce, or both.
- Check the GMMA length list and keep it ascending.
- Backtest level targets/stops on and off.
- Include failed breakouts and falling periods.
A practical tuning workflow
Start with market structure:
- Increase level lookback for broader, slower-changing levels.
- Increase ATR buffer to demand cleaner separation.
- Keep GMMA stacking enabled to require an orderly trend.
Then isolate entry types. Do not compare breakout performance while support bounces remain enabled unintentionally.
Tune level exits after signal quality. A support bounce has a natural resistance target; a breakout's extension target may be ignored when it lies behind the actual entry price.
Finally, choose protection. Signal exits do not realize a loss, so a failed level can remain open without it.
Core settings
| Label | Config parameter | Default | Description |
|---|---|---|---|
| Buy enabled | BUY_ENABLED | true | Allows level-based entries. |
| Sell enabled | SELL_ENABLED | true | Allows target, signal, and stop exits. |
| Period | PERIOD | 5 | Candle period in minutes. |
| 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 LGM_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 LGM_MIN_SELL_VALUE. For USDT-BTC, this value is in USDT. |
| Gain | GAIN | 0.35 | General target value. Keep the intended value explicit in LGM_TARGET_PCT. |
Execution and session settings
| Label | Config parameter | Default | Description |
|---|---|---|---|
| LGM trading limit | LGM_TRADING_LIMIT | 100 | For USDT-BTC, the amount of USDT used for the single buy. |
| LGM min order value | LGM_MIN_ORDER_VALUE | 10 | Minimum value required for a buy. For USDT-BTC, this value is in USDT. |
| LGM min sell value | LGM_MIN_SELL_VALUE | 10 | Minimum position value required for a sell. For USDT-BTC, this value is in USDT. |
| LGM cooldown ms | LGM_COOLDOWN_MS | 30000 | Minimum milliseconds between live actions. |
| LGM max spread % | LGM_MAX_SPREAD_PCT | 0.06 | Maximum spread as a percentage of midpoint. |
| LGM max spread absolute | LGM_MAX_SPREAD_ABSOLUTE | 0 | Optional maximum spread in pair price units. For USDT-BTC, this value is in USDT. |
| Use session filter | LGM_USE_SESSION_FILTER | false | Restricts entries to configured New York-time windows. |
| Entry windows EST | LGM_ENTRY_WINDOWS_EST | 08:00-17:00 | Comma-separated entry windows in New York time. |
Level, ATR, and GMMA settings
| Label | Config parameter | Default | Description |
|---|---|---|---|
| Level lookback | LGM_LEVEL_LOOKBACK | 50 | Previous candles used to find support and resistance. |
| Level buffer ATR | LGM_LEVEL_BUFFER_ATR | 0.2 | ATR multiple around levels. Higher values require a larger break or recovery. |
| ATR length | LGM_ATR_LENGTH | 14 | Volatility lookback used for the buffer. |
| GMMA slow lengths | LGM_GMMA_SLOW_LENGTHS | 30,35,40,45,50,60 | Comma-separated EMA lengths. Enter them shortest to longest. |
| Require GMMA stack | LGM_REQUIRE_GMMA_STACK | true | Requires the ribbon to be ordered bullish for entry and bearish for a flip exit. |
| Entry mode | LGM_ENTRY_MODE | breakout | Accepts breakout, bounce, or both. |
| Allow support bounce | LGM_ALLOW_SUPPORT_BOUNCE | true | Enables support-bounce entries even when entry mode is breakout. |
| Exit on bearish level | LGM_EXIT_ON_BEARISH_LEVEL | true | Allows a bearish level break or rejection to sell at or above break-even. |
| Exit on GMMA flip | LGM_EXIT_ON_GMMA_FLIP | true | Allows bearish GMMA alignment to sell at or above break-even. |
Target and stop settings
| Label | Config parameter | Default | Description |
|---|---|---|---|
| Use pips | LGM_USE_PIPS | false | Uses pip target and stop distances instead of percentages. |
| Pip size | LGM_PIP_SIZE | 0.0001 | Pair-price value of one pip. For USDT-BTC, this value is in USDT. |
| Target pips | LGM_TARGET_PIPS | 8 | Fixed target distance in pip mode. |
| Stop pips | LGM_STOP_PIPS | 8 | Fixed stop distance in pip mode. |
| Target % | LGM_TARGET_PCT | 0.5 | Fixed target above entry in percentage mode. |
| Minimum net gain % | LGM_MIN_NET_GAIN_PCT | 0.1 | Minimum gain above estimated fee-adjusted break-even. |
| Stop % | LGM_STOP_PCT | 0.35 | Fixed stop below entry in percentage mode. |
| Use level target | LGM_USE_LEVEL_TARGET | true | Adds a setup-specific level target and uses the closer valid target. |
| Use level stop | LGM_USE_LEVEL_STOP | true | Adds a setup-specific level stop and uses the closer valid stop. |
| Use protection | LGM_USE_PROTECTION | false | Allows the stored stop to close below break-even. |
News and backtesting
| Label | Config parameter | Default | Description |
|---|---|---|---|
| News block | LGM_NEWS_BLOCK | false | Manually pauses new entries. |
| News block until | LGM_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 deeper backtesting without changing live signals. |
Important limitations
- Support bounce is enabled independently of entry mode by default.
- GMMA lengths must be entered in a sensible ascending order.
- The strategy opens one position and does not DCA.
- Bearish level and GMMA exits never realize a loss.
- Only enabled protection activates the stored stop.
- Session and news filters affect entries only.
Levels give the strategy a repeatable map, while GMMA supplies direction. The best configurations are those where both tell the same story before entry—not those that force either filter to accept every move.