Skip to main content

CCI Stochastic GMMA

CCI Stochastic GMMA strategy behavior

CCI Stochastic GMMA combines a stochastic oscillator calculated from CCI with two Guppy-style EMA groups. It buys when CCI momentum rises out of an oversold region while the short EMA group is above the long group and price is above both.

This makes it a trend-aligned momentum-recovery strategy rather than a simple oversold buyer.

warning

Protection is disabled by default. Bearish and trend-loss exits only execute at break-even or better.

CCI stochastic trigger

CSG_CCI_PERIOD creates the underlying CCI series. A stochastic oscillator is then calculated over that series using CSG_STOCH_PERIOD, CSG_STOCH_K_SMOOTH, and CSG_STOCH_D_SMOOTH.

CSG_SIGNAL_LINE selects which result controls threshold crossings:

  • k uses K;
  • d uses D;
  • either uses the higher of K and D on each candle.

A buy needs the selected value to cross upward through CSG_OVERSOLD. A bearish setup needs it to cross downward through CSG_OVERBOUGHT.

Higher smoothing reduces short-lived crossings. Raising oversold makes bullish triggers easier and later in the recovery; lowering it demands a deeper oscillator decline first.

GMMA trend structure

CSG_SHORT_EMAS and CSG_LONG_EMAS are comma-separated EMA lengths. The defaults form the familiar short and long Guppy groups.

With CSG_REQUIRE_GROUP_CROSS disabled, the average short group only needs to be above the average long group. Enable it to require a fresh group-average crossover on the signal candle.

Enable CSG_REQUIRE_ALL_SHORT_ABOVE to require every short EMA above the long-group average. This is stricter than comparing group averages.

Price must close above both group averages. Enable CSG_REQUIRE_CANDLE_COLOR to additionally require a green entry candle.

The strategy opens one position and does not average down.

Stop and target

The stop is placed below the lowest low in CSG_SWING_LOOKBACK, with an extra CSG_STOP_BUFFER_PCT.

Enable CSG_USE_PROTECTION to make that structural stop executable. With protection enabled, the target is at least both:

  • CSG_TARGET_PCT above entry;
  • initial risk multiplied by CSG_RISK_REWARD.

Without protection, risk/reward does not raise the target; the fixed target applies. CSG_USE_TARGET controls whether the target executes, and CSG_MIN_NET_GAIN_PCT maintains a fee-aware floor.

Technical exits

Enable CSG_EXIT_ON_BEARISH_CROSS for a profitable exit on the complete mirrored bearish setup: CCI stochastic falls from overbought, GMMA is bearish, and price is below both groups.

Enable CSG_EXIT_ON_MOMENTUM_LOSS to exit profitably when the selected CCI-stochastic value falls below 50.

A short-group average below the long-group average is an always-active profitable trend-loss exit. Protection is required for deliberate loss-taking.

Good market conditions

The strategy generally works best during orderly uptrends where the long EMA group is stable, the short group contracts during a pullback, and CCI stochastic recovers from oversold as price reclaims both groups.

Avoid tangled EMA groups, thin markets, and sideways ranges where oscillator threshold crossings occur without sustained group separation.

Creating the strategy

Create a spot strategy and choose CCI Stochastic GMMA for both methods. Begin with the default 15-minute period.

First verify the EMA lists and group structure. Then tune oscillator responsiveness and decide whether current alignment or a fresh group cross is required. Add candle color and all-short confirmation only when they remove specific weak setups.

Strategy settings

Trading and safeguards

SettingDescription
BUY_ENABLEDEnables entries.
SELL_ENABLEDEnables exits.
PERIODCandle period; default 15 minutes.
TRADING_LIMITCompatibility fallback only. It is ignored while the strategy-specific trading limit contains a positive value. Configure the strategy-specific setting for normal use. For USDT-BTC, this value is in USDT.
CSG_TRADING_LIMITFor USDT-BTC, the amount of USDT used for an entry.
FUNDS_RESERVEFor USDT-BTC, the amount of USDT the bot must leave unused.
KEEP_QUOTEFor USDT-BTC, the amount of BTC the strategy must not sell.
MIN_VOLUME_TO_BUYGeneral minimum buy value. For USDT-BTC, this value is in USDT.
MIN_VOLUME_TO_SELLGeneral minimum sell value. For USDT-BTC, this value is in USDT.
CSG_MIN_ORDER_VALUEStrategy minimum entry value. For USDT-BTC, this value is in USDT.
CSG_MIN_SELL_VALUEStrategy minimum exit value. For USDT-BTC, this value is in USDT.
GAINGeneral gain fallback retained in configuration.
CSG_COOLDOWN_MSDelay between live actions.
CSG_MAX_SPREAD_PCTRelative spread ceiling.
CSG_MAX_SPREAD_ABSOLUTEOptional absolute spread ceiling; 0 disables it. For USDT-BTC, this value is in USDT.
CSG_NEWS_BLOCKManually blocks entries.
CSG_NEWS_BLOCK_UNTILBlocks entries until the configured time.

Signal

SettingDescription
CSG_CCI_PERIODCCI length feeding the stochastic calculation.
CSG_STOCH_PERIODStochastic lookback over CCI.
CSG_STOCH_K_SMOOTHK smoothing.
CSG_STOCH_D_SMOOTHD smoothing.
CSG_SIGNAL_LINEChooses K, D, or either for threshold crossings.
CSG_OVERSOLDUpward-cross threshold for entries.
CSG_OVERBOUGHTDownward-cross threshold for bearish setups.
CSG_SHORT_EMASComma-separated short EMA lengths.
CSG_LONG_EMASComma-separated long EMA lengths.
CSG_REQUIRE_GROUP_CROSSRequires a fresh short/long group-average cross.
CSG_REQUIRE_ALL_SHORT_ABOVERequires every short EMA above the long average for buys.
CSG_REQUIRE_CANDLE_COLORRequires a green entry candle and red bearish candle.

Risk and exits

SettingDescription
CSG_SWING_LOOKBACKCandles searched for the structural stop.
CSG_STOP_BUFFER_PCTExtra distance below the recent low.
CSG_RISK_REWARDInitial-risk multiplier used to raise the target with protection.
CSG_USE_TARGETEnables the target.
CSG_USE_PROTECTIONEnables the structural stop.
CSG_TARGET_PCTFixed target distance.
CSG_MIN_NET_GAIN_PCTIntended gain beyond fee break-even.
CSG_EXIT_ON_BEARISH_CROSSEnables profitable exit on the full bearish setup.
CSG_EXIT_ON_MOMENTUM_LOSSEnables profitable exit below oscillator 50.

Backtesting

SettingDescription
BF_SINCEBacktest start.
BF_UNTILBacktest end.
DEEP_TESTINGEnables deeper backtesting.

Practical tuning directions

Fresh group-cross mode is much stricter than trend-alignment mode and can miss pullback continuations. Compare those modes before changing all EMA lengths.

If the structural stop is too wide, reduce swing lookback or choose a market and period with cleaner pullbacks. A small stop buffer cannot compensate for an irrelevant old low.

Important limitations

  • CCI stochastic is an oscillator of an oscillator and can be very sensitive.
  • either signal-line mode does not mean either line crossing independently; it uses the higher current value.
  • The always-active GMMA trend-loss exit waits for profit.
  • Risk/reward raises the target only when protection is enabled.
  • Custom EMA lists must contain sensible positive lengths.
  • News blocking is manual.

CCI Stochastic GMMA is most useful when momentum recovers inside an already recognizable trend. Oversold alone is not the thesis; the EMA groups provide the context.