CI System

CI System looks for a bullish reversal pattern while short-term momentum turns upward. It can also take a “second chance” entry when the fast EMA crosses above the slow EMA after the candle pattern opportunity has passed. An optional longer EMA filter keeps entries aligned with the broader trend.
Once in a position, the strategy aims for a fixed or Fibonacci-based target. Protection can place a stop near recent structure without allowing that stop to become wider than the configured fixed distance.
The default 15-minute period suits short intraday swings where candle structure is visible but individual ticks do not dominate the signal.
warning
Protective stops are disabled by default. Without protection, CI System waits for a profitable target or technical exit and does not deliberately sell at a loss.
How entries work
The primary long entry combines:
- a bullish engulfing or morning star pattern;
- a fresh bullish stochastic crossover, when stochastic confirmation is required;
- a rising broader trend, when the trend filter is required.
The candle pattern identifies a possible reversal. Stochastic confirmation checks that short-term momentum is turning with it. The trend filter asks price and the longer EMA to support the same direction.
CI System opens one position at a time and does not average down.
Candle-pattern signal
The primary signal recognizes two common bullish reversal structures:
- bullish engulfing, where buying pressure overtakes the preceding bearish candle;
- morning star, a multi-candle transition from selling pressure toward a bullish recovery.
The mirrored bearish patterns are used for exits, not short entries in spot trading.
There are no separate user settings for the pattern definitions. Their usefulness therefore depends heavily on PERIOD: a pattern on a 15-minute chart describes a different market move from the same pattern on a one-hour chart.
Stochastic confirmation
CI_STOCH_K, CI_STOCH_K_SMOOTH, and CI_STOCH_D control the stochastic oscillator. A primary buy normally needs the K line to cross upward through the D line on the current candle.
Enable CI_REQUIRE_STOCH_CONFIRMATION for this fresh crossover requirement. Disable it to let a qualifying bullish pattern enter without waiting for the stochastic cross.
Shorter lengths react sooner but generate more changes of direction. Longer or more heavily smoothed values reject some noise, at the cost of later signals.
This strategy uses the direction of the stochastic crossover rather than a user-set overbought or oversold level. A bullish cross can therefore occur anywhere in the oscillator’s range.
Trend filter
The trend filter uses CI_TREND_EMA and CI_TREND_SLOPE_LOOKBACK.
For a long entry, the current close must be above the trend EMA and that EMA must be flat or rising compared with its value at the start of the slope lookback. Enable or disable this requirement with CI_REQUIRE_TREND.
A longer trend EMA produces a slower, broader filter. A larger slope lookback asks the EMA to maintain direction across more candles. Both changes usually reduce entry frequency.
Disabling the trend filter permits countertrend reversals. That can help near well-defined range lows, but it also admits many more attempts against a sustained decline.
EMA second-chance entry
CI_EMA_FAST and CI_EMA_SLOW form a short-term EMA pair. Keep the slow length above the fast length.
When CI_ALLOW_EMA_SECOND_CHANCE is enabled, CI System can buy on a fresh fast-over-slow EMA cross while stochastic K is above D. This route does not require a new candle pattern or a fresh stochastic crossover. The broader trend filter still applies when enabled.
This is useful when the original reversal pattern appeared before the market had enough momentum to enter. It also broadens the strategy: some EMA-cross entries will not have a recent recognized reversal pattern.
Disable second-chance entries if you want every entry to originate from one of the candle patterns. Increase the EMA lengths when the default pair responds too often to ordinary candle noise.
Target selection
In normal percentage mode, CI_TARGET_PCT sets the fixed target above average buy price. In pip mode, the target distance is derived from the stop distance and CI_RISK_REWARD.
All targets are raised when necessary to cover estimated round-trip fees and CI_MIN_NET_GAIN_PCT.
Risk/reward target
The strategy measures the distance from average buy price to its current stop reference and multiplies that risk by CI_RISK_REWARD.
Without a Fibonacci target, this risk/reward target is used when CI_USE_PROTECTION is enabled. The strategy will not choose a target below the configured fixed target in that mode.
With protection disabled and Fibonacci targeting disabled, the ordinary percentage target remains in control.
Fibonacci target
Enable CI_USE_FIB_TARGET to search the range defined by CI_FIB_LOOKBACK for extension levels above the market. CI System selects the nearest suitable extension that leaves approximately enough room for the configured risk/reward objective.
This means CI_RISK_REWARD also influences which Fibonacci targets qualify. If no suitable extension is available, the strategy falls back to its normal target logic.
Fibonacci targeting works best when the lookback contains a meaningful impulse range. In a flat or erratic window, an extension can be technically valid without being a realistic destination.
Stop placement
Enable CI_USE_PROTECTION to allow a loss-taking protective stop.
CI System compares two possible stop locations:
- below the recent low from
CI_PIVOT_LOOKBACK; - the configured fixed distance below average buy price.
It uses the closer of the two. Recent structure can tighten the stop, but a distant pivot cannot widen risk beyond the fixed distance.
In percentage mode, CI_STOP_PCT sets that fixed distance. In pip mode, the distance is CI_STOP_BUFFER_PIPS × CI_PIP_SIZE. CI_USE_PIPS selects the mode.
Choose CI_PIP_SIZE carefully for the pair. An incorrect pip size makes both risk and target calculations misleading.
Technical exits
CI System can close a profitable position when a bearish engulfing or evening star pattern appears. If CI_REQUIRE_STOCH_CONFIRMATION is enabled, that pattern also needs a fresh bearish stochastic crossover.
This pattern exit does not wait for the longer trend EMA to turn downward.
When CI_EXIT_ON_EMA_FLIP is enabled, a fresh fast-below-slow EMA cross can also close a position at a profitable price.
Both technical exits respect the fee-aware break-even floor. The protective stop is the only normal route that intentionally accepts a loss.
Spread, news, and cooldown controls
CI_MAX_SPREAD_PCT blocks entries when the spread is too large relative to price. CI_MAX_SPREAD_ABSOLUTE can add a spread limit expressed in USDT for USDT-BTC; 0 disables that additional check.
CI_NEWS_BLOCK and CI_NEWS_BLOCK_UNTIL are manual entry blocks. They do not fetch or interpret a news feed. Existing positions can still be managed while new entries are blocked.
CI_COOLDOWN_MS prevents live actions from being placed too close together. It is not used to reproduce time delays in backtests.
Good market conditions
CI System generally works best when:
- the pair is liquid and spread is consistently small;
- a pullback or consolidation forms recognizable candle structure;
- stochastic momentum turns upward with the reversal;
- price remains above a flat or rising broader EMA;
- recent pivots provide a sensible stop location;
- the expected swing has enough room to cover fees and the target.
A typical favorable setup is an established intraday uptrend followed by an orderly pullback. Selling pressure fades, a bullish reversal pattern appears, and stochastic momentum crosses upward while the trend EMA remains constructive.
The second-chance route is most useful when price confirms the recovery with an EMA cross shortly after the initial turn.
Be cautious in thin markets, during sudden spread expansion, or in persistent declines where bullish candle patterns repeatedly fail. Very narrow sideways ranges can produce frequent stochastic and EMA crosses without enough movement to reach a useful target.
Creating the strategy
Create a spot strategy and choose CI System as the buy and sell method. Start with backtesting or paper trading on the default 15-minute period.
A practical setup sequence is:
- Select a liquid pair with stable spreads.
- Keep the default candle period and indicator lengths initially.
- Decide whether entries must follow the broader trend.
- Compare pattern-only entries with the EMA second-chance route.
- Tune stochastic responsiveness only after reviewing false turns.
- Choose percentage or pip-based risk.
- Enable protection if the strategy must accept defined losses.
- Compare fixed and Fibonacci targets across trends and ranges.
Strategy settings
Trading and execution
| Setting | Description |
|---|---|
BUY_ENABLED | Enables new buy orders. |
SELL_ENABLED | Enables target, technical, and protective sell orders. |
PERIOD | Candle period used for patterns and all indicators; default 15 minutes. |
TRADING_LIMIT | Compatibility 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. |
CI_TRADING_LIMIT | For USDT-BTC, the amount of USDT used for a CI System entry. |
FUNDS_RESERVE | For USDT-BTC, the amount of USDT the bot must leave unused. |
KEEP_QUOTE | For USDT-BTC, the amount of BTC the strategy must not sell. |
MIN_VOLUME_TO_BUY | General minimum buy value. For USDT-BTC, this value is in USDT. |
MIN_VOLUME_TO_SELL | General minimum sell value. For USDT-BTC, this value is in USDT. |
CI_MIN_ORDER_VALUE | Strategy-specific minimum entry value. For USDT-BTC, this value is in USDT. |
CI_MIN_SELL_VALUE | Strategy-specific minimum exit value. For USDT-BTC, this value is in USDT. |
GAIN | General gain fallback retained in the configuration. |
CI_COOLDOWN_MS | Minimum delay in milliseconds between live actions. |
CI_MAX_SPREAD_PCT | Maximum permitted spread as a percentage. |
CI_MAX_SPREAD_ABSOLUTE | Optional maximum spread in USDT for a pair such as USDT-BTC. 0 disables it. |
CI_NEWS_BLOCK | Manually blocks new entries. |
CI_NEWS_BLOCK_UNTIL | Blocks new entries until the configured time. |
EMA, trend, and stochastic signal
| Setting | Description |
|---|---|
CI_EMA_FAST | Fast EMA length for second-chance entries and EMA-flip exits. |
CI_EMA_SLOW | Slow EMA length; keep it above the fast length. |
CI_TREND_EMA | Broader EMA length used by the optional trend filter. |
CI_TREND_SLOPE_LOOKBACK | Candles used to determine whether the trend EMA is rising or falling. |
CI_REQUIRE_TREND | Requires price and trend-EMA direction to agree with new entries. |
CI_STOCH_K | Base stochastic K lookback. |
CI_STOCH_K_SMOOTH | Smoothing applied to stochastic K. |
CI_STOCH_D | Stochastic D smoothing length. |
CI_REQUIRE_STOCH_CONFIRMATION | Requires a fresh stochastic cross for primary pattern entries and exits. |
CI_ALLOW_EMA_SECOND_CHANCE | Allows an EMA-cross entry with stochastic direction after the pattern opportunity. |
CI_EXIT_ON_EMA_FLIP | Allows a profitable exit on a fresh bearish EMA cross. |
Structure, target, and protection
| Setting | Description |
|---|---|
CI_PIVOT_LOOKBACK | Recent candles searched for the structural stop low. |
CI_FIB_LOOKBACK | Recent candles used to calculate Fibonacci extension targets. |
CI_USE_FIB_TARGET | Uses a suitable Fibonacci extension when one is available. |
CI_RISK_REWARD | Multiplier used to derive a target from the measured stop risk. |
CI_USE_PIPS | Uses pip-based stop distance and risk-derived target behavior. |
CI_PIP_SIZE | For USDT-BTC, the USDT value represented by one pip. |
CI_STOP_BUFFER_PIPS | Fixed stop distance in pip mode. |
CI_STOP_PCT | Fixed stop distance in percentage mode. |
CI_TARGET_PCT | Fixed target distance in percentage mode. |
CI_USE_PROTECTION | Activates the loss-taking protective stop and risk/reward target floor. |
CI_MIN_NET_GAIN_PCT | Minimum intended gain beyond estimated round-trip fee break-even. |
Backtesting range
| Setting | Description |
|---|---|
BF_SINCE | Start of the selected backtesting period. |
BF_UNTIL | End of the selected backtesting period. |
DEEP_TESTING | Enables deeper backtesting mode in the editor. |
Practical tuning directions
If the strategy buys too many weak reversals, keep the trend and stochastic requirements enabled, lengthen the trend EMA, or increase stochastic smoothing. If it enters too late, first compare the primary and second-chance routes before shortening every indicator.
Reduce CI_PIVOT_LOOKBACK when older lows make the structural stop irrelevant. Increase it when meaningful pullback lows regularly sit just outside the window. Remember that the fixed stop remains the maximum permitted risk distance.
Use a Fibonacci target only when the selected lookback regularly captures coherent impulse ranges. Otherwise, a consistent fixed target is easier to reason about and test.
Test protection both enabled and disabled. Enabling it changes more than the loss exit: it can also raise the target to respect the configured risk/reward relationship.
Important limitations
- Candle patterns do not guarantee reversal or continuation.
- The second-chance route can enter without a fresh recognized candle pattern.
- The stochastic signal uses crossover direction, not an oversold threshold.
- Trend filtering can avoid countertrend entries but also miss early reversals.
- Fibonacci extensions depend strongly on the selected lookback range.
- The pivot stop can tighten the fixed stop, but cannot widen it.
- Technical exits wait for a fee-aware profitable price.
- News blocking is manual and does not consume an external news feed.
- Backtests cannot perfectly reproduce live spread, slippage, latency, or liquidity.
CI System is most coherent when candle structure, momentum, and the broader trend tell the same story. Treat the EMA second chance as a deliberate expansion of that setup, not as a reason to loosen every other filter at once.