Skip to main content

42 Tasty Market Conditions: Mercury Bot's Time-Based Trading Signals

· 12 min read
Max Kaido
Architect

Introduction

Mercury Bot's market analysis system has evolved to include a sophisticated set of time-based trading conditions. Each condition is designed with a specific timeframe target, making them ideal for automated trading systems. This guide introduces 42 "tasty" market conditions that combine technical indicators with precise time-based profit targets.

Implementation Structure

Each market condition is implemented using this TypeScript interface:

interface MarketCondition {
name: string;
type: 'BUY' | 'SELL';
timeframe: string;
targetTimeframe: string;
definition: string;
requiredIndicators: string[];
conditions: IndicatorCondition[];
confirmationRules: ConfirmationRule[];
}

interface ConfirmationRule {
type: 'VOLUME' | 'PRICE' | 'MOMENTUM' | 'PATTERN';
condition: string;
lookback?: number;
}

// Example implementation
const CROSS_FADE_BUY: MarketCondition = {
name: 'CROSS_FADE_BUY_MARKET_TP_IN_6H',
type: 'BUY',
timeframe: '1h',
targetTimeframe: '6h',
definition:
'A short-term bullish crossover that immediately fades, offering a low-risk entry',
requiredIndicators: ['macd', 'volume', 'rsi'],
conditions: [
{
indicator: 'macd',
condition: 'CROSSING_UP',
lookback: 1,
},
{
indicator: 'macd.histogram',
condition: 'DECREASING',
lookback: 2,
},
],
confirmationRules: [
{
type: 'VOLUME',
condition: 'ABOVE_AVERAGE',
lookback: 24,
},
],
};

Core Categories

Crossover Patterns (1-2)

  1. CROSS_FADE_BUY_MARKET_TP_IN_6H

    • Definition: Bullish crossover with immediate fade
    • Timeframe: 6h target
    • Key Indicators: MACD, Moving Averages
    • Implementation: Monitor for crossover then slight pullback
  2. CROSS_FADE_SELL_MARKET_TP_IN_6H

    • Definition: Bearish crossover with quick rebound
    • Timeframe: 6h target
    • Key Indicators: MACD, Moving Averages
    • Implementation: Track crossover and bounce for short entry

Candlestick Rejections (3-4)

  1. WICK_REJECT_BUY_MARKET_TP_IN_1D

    const WICK_REJECT_BUY: MarketCondition = {
    name: 'WICK_REJECT_BUY_MARKET_TP_IN_1D',
    type: 'BUY',
    timeframe: '1h',
    targetTimeframe: '1d',
    definition:
    'Bullish setup when a candle forms a long lower wick on strong volume',
    requiredIndicators: ['volume', 'candle_data'],
    conditions: [
    {
    indicator: 'candle.lowerWick',
    condition: 'GREATER_THAN',
    value: 'candle.body * 2',
    },
    {
    indicator: 'candle.close',
    condition: 'ABOVE',
    value: 'candle.open',
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 3,
    },
    ],
    };
  2. WICK_REJECT_SELL_MARKET_TP_IN_1D

    const WICK_REJECT_SELL: MarketCondition = {
    name: 'WICK_REJECT_SELL_MARKET_TP_IN_1D',
    type: 'SELL',
    timeframe: '1h',
    targetTimeframe: '1d',
    definition: 'Bearish strategy when a candle shows a long upper wick',
    requiredIndicators: ['volume', 'candle_data'],
    conditions: [
    {
    indicator: 'candle.upperWick',
    condition: 'GREATER_THAN',
    value: 'candle.body * 2',
    },
    {
    indicator: 'candle.close',
    condition: 'BELOW',
    value: 'candle.open',
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 3,
    },
    ],
    };

Technical Indicator Signals (5-6)

  1. PSAR_RISE_BUY_MARKET_TP_IN_2D

    const PSAR_RISE_BUY: MarketCondition = {
    name: 'PSAR_RISE_BUY_MARKET_TP_IN_2D',
    type: 'BUY',
    timeframe: '4h',
    targetTimeframe: '2d',
    definition: 'Buy when Parabolic SAR flips below price',
    requiredIndicators: ['psar', 'rsi', 'volume'],
    conditions: [
    {
    indicator: 'psar',
    condition: 'FLIP_BULLISH',
    lookback: 1,
    },
    {
    indicator: 'rsi',
    condition: 'ABOVE',
    value: 40,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'ABOVE_AVERAGE',
    lookback: 12,
    },
    ],
    };
  2. PSAR_FALL_SELL_MARKET_TP_IN_2D

    const PSAR_FALL_SELL: MarketCondition = {
    name: 'PSAR_FALL_SELL_MARKET_TP_IN_2D',
    type: 'SELL',
    timeframe: '4h',
    targetTimeframe: '2d',
    definition: 'Sell when Parabolic SAR switches above price',
    requiredIndicators: ['psar', 'rsi', 'volume'],
    conditions: [
    {
    indicator: 'psar',
    condition: 'FLIP_BEARISH',
    lookback: 1,
    },
    {
    indicator: 'rsi',
    condition: 'BELOW',
    value: 60,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'ABOVE_AVERAGE',
    lookback: 12,
    },
    ],
    };

Backtrace Patterns (7-8)

  1. BACKTRACE_BUY_MARKET_TP_IN_3D

    const BACKTRACE_BUY: MarketCondition = {
    name: 'BACKTRACE_BUY_MARKET_TP_IN_3D',
    type: 'BUY',
    timeframe: '4h',
    targetTimeframe: '3d',
    definition: 'Price dips back to prior breakout level',
    requiredIndicators: ['support_resistance', 'volume', 'momentum'],
    conditions: [
    {
    indicator: 'price',
    condition: 'NEAR_SUPPORT',
    value: 0.5, // % tolerance
    },
    {
    indicator: 'momentum',
    condition: 'POSITIVE',
    lookback: 3,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 6,
    },
    ],
    };
  2. BACKTRACE_SELL_MARKET_TP_IN_3D

    const BACKTRACE_SELL: MarketCondition = {
    name: 'BACKTRACE_SELL_MARKET_TP_IN_3D',
    type: 'SELL',
    timeframe: '4h',
    targetTimeframe: '3d',
    definition: 'Price retests old support as resistance',
    requiredIndicators: ['support_resistance', 'volume', 'momentum'],
    conditions: [
    {
    indicator: 'price',
    condition: 'NEAR_RESISTANCE',
    value: 0.5, // % tolerance
    },
    {
    indicator: 'momentum',
    condition: 'NEGATIVE',
    lookback: 3,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 6,
    },
    ],
    };

Dual Band Patterns (9-10)

  1. DUAL_BANDPIN_BUY_MARKET_TP_IN_8H

    const DUAL_BANDPIN_BUY: MarketCondition = {
    name: 'DUAL_BANDPIN_BUY_MARKET_TP_IN_8H',
    type: 'BUY',
    timeframe: '1h',
    targetTimeframe: '8h',
    definition: 'Price pierces both Bollinger and Keltner bands',
    requiredIndicators: ['bollinger', 'keltner', 'rsi'],
    conditions: [
    {
    indicator: 'price',
    condition: 'BELOW_BOTH_BANDS',
    lookback: 1,
    },
    {
    indicator: 'rsi',
    condition: 'OVERSOLD',
    value: 30,
    },
    ],
    confirmationRules: [
    {
    type: 'PATTERN',
    condition: 'BULLISH_CANDLE',
    lookback: 1,
    },
    ],
    };
  2. DUAL_BANDPIN_SELL_MARKET_TP_IN_8H

    const DUAL_BANDPIN_SELL: MarketCondition = {
    name: 'DUAL_BANDPIN_SELL_MARKET_TP_IN_8H',
    type: 'SELL',
    timeframe: '1h',
    targetTimeframe: '8h',
    definition: 'Price pierces both bands to the upside',
    requiredIndicators: ['bollinger', 'keltner', 'rsi'],
    conditions: [
    {
    indicator: 'price',
    condition: 'ABOVE_BOTH_BANDS',
    lookback: 1,
    },
    {
    indicator: 'rsi',
    condition: 'OVERBOUGHT',
    value: 70,
    },
    ],
    confirmationRules: [
    {
    type: 'PATTERN',
    condition: 'BEARISH_CANDLE',
    lookback: 1,
    },
    ],
    };

Stairway Patterns (11-12)

  1. STAIRWAY_BUY_MARKET_TP_IN_2D

    const STAIRWAY_BUY: MarketCondition = {
    name: 'STAIRWAY_BUY_MARKET_TP_IN_2D',
    type: 'BUY',
    timeframe: '4h',
    targetTimeframe: '2d',
    definition: 'Step-like ascending pattern with higher lows',
    requiredIndicators: ['price_action', 'volume', 'trend'],
    conditions: [
    {
    indicator: 'price.lows',
    condition: 'ASCENDING',
    lookback: 3,
    },
    {
    indicator: 'trend.direction',
    condition: 'BULLISH',
    lookback: 12,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'STEADY',
    lookback: 12,
    },
    {
    type: 'MOMENTUM',
    condition: 'POSITIVE',
    lookback: 3,
    },
    ],
    };
  2. STAIRWAY_SELL_MARKET_TP_IN_2D

    const STAIRWAY_SELL: MarketCondition = {
    name: 'STAIRWAY_SELL_MARKET_TP_IN_2D',
    type: 'SELL',
    timeframe: '4h',
    targetTimeframe: '2d',
    definition: 'Step-like descending pattern with lower highs',
    requiredIndicators: ['price_action', 'volume', 'trend'],
    conditions: [
    {
    indicator: 'price.highs',
    condition: 'DESCENDING',
    lookback: 3,
    },
    {
    indicator: 'trend.direction',
    condition: 'BEARISH',
    lookback: 12,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'STEADY',
    lookback: 12,
    },
    {
    type: 'MOMENTUM',
    condition: 'NEGATIVE',
    lookback: 3,
    },
    ],
    };

Higher Low/Lower High Patterns (13-14)

  1. HIGHER_LOW_BUY_MARKET_TP_IN_4H

    const HIGHER_LOW_BUY: MarketCondition = {
    name: 'HIGHER_LOW_BUY_MARKET_TP_IN_4H',
    type: 'BUY',
    timeframe: '1h',
    targetTimeframe: '4h',
    definition: 'Fresh higher low formation on 4h chart',
    requiredIndicators: ['swing_points', 'volume', 'momentum'],
    conditions: [
    {
    indicator: 'swing.low',
    condition: 'HIGHER_THAN_PREVIOUS',
    lookback: 1,
    },
    {
    indicator: 'momentum.macd',
    condition: 'BULLISH_DIVERGENCE',
    lookback: 2,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 4,
    },
    {
    type: 'PRICE',
    condition: 'ABOVE_EMA20',
    lookback: 1,
    },
    ],
    };
  2. LOWER_HIGH_SELL_MARKET_TP_IN_4H

    const LOWER_HIGH_SELL: MarketCondition = {
    name: 'LOWER_HIGH_SELL_MARKET_TP_IN_4H',
    type: 'SELL',
    timeframe: '1h',
    targetTimeframe: '4h',
    definition: 'Lower high formation on 4h chart',
    requiredIndicators: ['swing_points', 'volume', 'momentum'],
    conditions: [
    {
    indicator: 'swing.high',
    condition: 'LOWER_THAN_PREVIOUS',
    lookback: 1,
    },
    {
    indicator: 'momentum.macd',
    condition: 'BEARISH_DIVERGENCE',
    lookback: 2,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 4,
    },
    {
    type: 'PRICE',
    condition: 'BELOW_EMA20',
    lookback: 1,
    },
    ],
    };

RSI Momentum Patterns (15-16)

  1. RSI_JOLT_BUY_MARKET_TP_IN_1D

    const RSI_JOLT_BUY: MarketCondition = {
    name: 'RSI_JOLT_BUY_MARKET_TP_IN_1D',
    type: 'BUY',
    timeframe: '1h',
    targetTimeframe: '1d',
    definition: 'RSI sharply bounces from near-oversold territory',
    requiredIndicators: ['rsi', 'volume', 'momentum'],
    conditions: [
    {
    indicator: 'rsi',
    condition: 'CROSSING_UP',
    value: 40,
    },
    {
    indicator: 'rsi.slope',
    condition: 'POSITIVE',
    lookback: 3,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 3,
    },
    {
    type: 'MOMENTUM',
    condition: 'ACCELERATING',
    lookback: 2,
    },
    ],
    };
  2. RSI_COOLDOWN_SELL_MARKET_TP_IN_1D

    const RSI_COOLDOWN_SELL: MarketCondition = {
    name: 'RSI_COOLDOWN_SELL_MARKET_TP_IN_1D',
    type: 'SELL',
    timeframe: '1h',
    targetTimeframe: '1d',
    definition: 'RSI rapidly drops from overbought levels',
    requiredIndicators: ['rsi', 'volume', 'momentum'],
    conditions: [
    {
    indicator: 'rsi',
    condition: 'CROSSING_DOWN',
    value: 70,
    },
    {
    indicator: 'rsi.slope',
    condition: 'NEGATIVE',
    lookback: 3,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 3,
    },
    {
    type: 'MOMENTUM',
    condition: 'DECELERATING',
    lookback: 2,
    },
    ],
    };

Ichimoku Patterns (17-18)

  1. TENKAN_KIJUN_BUY_MARKET_TP_IN_3D

    const TENKAN_KIJUN_BUY: MarketCondition = {
    name: 'TENKAN_KIJUN_BUY_MARKET_TP_IN_3D',
    type: 'BUY',
    timeframe: '4h',
    targetTimeframe: '3d',
    definition: 'Ichimoku Tenkan-Sen crosses above Kijun-Sen',
    requiredIndicators: ['ichimoku', 'volume', 'price'],
    conditions: [
    {
    indicator: 'ichimoku.tenkan',
    condition: 'CROSSING_ABOVE',
    value: 'ichimoku.kijun',
    },
    {
    indicator: 'price',
    condition: 'ABOVE',
    value: 'ichimoku.cloud.top',
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'ABOVE_AVERAGE',
    lookback: 12,
    },
    {
    type: 'MOMENTUM',
    condition: 'POSITIVE',
    lookback: 3,
    },
    ],
    };
  2. TENKAN_KIJUN_SELL_MARKET_TP_IN_3D

    const TENKAN_KIJUN_SELL: MarketCondition = {
    name: 'TENKAN_KIJUN_SELL_MARKET_TP_IN_3D',
    type: 'SELL',
    timeframe: '4h',
    targetTimeframe: '3d',
    definition: 'Bearish signal from Tenkan-Sen crossing below Kijun-Sen',
    requiredIndicators: ['ichimoku', 'volume', 'price'],
    conditions: [
    {
    indicator: 'ichimoku.tenkan',
    condition: 'CROSSING_BELOW',
    value: 'ichimoku.kijun',
    },
    {
    indicator: 'price',
    condition: 'BELOW',
    value: 'ichimoku.cloud.bottom',
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'ABOVE_AVERAGE',
    lookback: 12,
    },
    {
    type: 'MOMENTUM',
    condition: 'NEGATIVE',
    lookback: 3,
    },
    ],
    };

Moving Average Cross Patterns (19-20)

  1. GOLDEN_CROSS_SPOT_BUY_MARKET_TP_IN_1W

    const GOLDEN_CROSS_BUY: MarketCondition = {
    name: 'GOLDEN_CROSS_SPOT_BUY_MARKET_TP_IN_1W',
    type: 'BUY',
    timeframe: '4h',
    targetTimeframe: '1w',
    definition: '50-day MA crossing above 200-day MA on spot markets',
    requiredIndicators: ['ma50', 'ma200', 'volume', 'momentum'],
    conditions: [
    {
    indicator: 'ma50',
    condition: 'CROSSING_ABOVE',
    value: 'ma200',
    },
    {
    indicator: 'price',
    condition: 'ABOVE',
    value: 'ma50',
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'SURGE',
    lookback: 24,
    },
    {
    type: 'MOMENTUM',
    condition: 'INCREASING',
    lookback: 5,
    },
    ],
    };
  2. DEATH_CROSS_SPOT_SELL_MARKET_TP_IN_1W

    const DEATH_CROSS_SELL: MarketCondition = {
    name: 'DEATH_CROSS_SPOT_SELL_MARKET_TP_IN_1W',
    type: 'SELL',
    timeframe: '4h',
    targetTimeframe: '1w',
    definition: '50-day MA dipping below 200-day MA',
    requiredIndicators: ['ma50', 'ma200', 'volume', 'momentum'],
    conditions: [
    {
    indicator: 'ma50',
    condition: 'CROSSING_BELOW',
    value: 'ma200',
    },
    {
    indicator: 'price',
    condition: 'BELOW',
    value: 'ma50',
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'SURGE',
    lookback: 24,
    },
    {
    type: 'MOMENTUM',
    condition: 'DECREASING',
    lookback: 5,
    },
    ],
    };

Fibonacci Patterns (21-22)

  1. FIBONACCI_REBOUND_BUY_MARKET_TP_IN_2D

    const FIBONACCI_REBOUND_BUY: MarketCondition = {
    name: 'FIBONACCI_REBOUND_BUY_MARKET_TP_IN_2D',
    type: 'BUY',
    timeframe: '4h',
    targetTimeframe: '2d',
    definition: 'Price retraces to key Fibonacci level and bounces',
    requiredIndicators: ['fibonacci', 'volume', 'momentum'],
    conditions: [
    {
    indicator: 'price',
    condition: 'NEAR_FIBO_LEVEL',
    value: [0.382, 0.5, 0.618],
    },
    {
    indicator: 'price.action',
    condition: 'BOUNCING',
    lookback: 3,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 6,
    },
    {
    type: 'MOMENTUM',
    condition: 'POSITIVE',
    lookback: 2,
    },
    ],
    };
  2. FIBONACCI_FADE_SELL_MARKET_TP_IN_2D

    const FIBONACCI_FADE_SELL: MarketCondition = {
    name: 'FIBONACCI_FADE_SELL_MARKET_TP_IN_2D',
    type: 'SELL',
    timeframe: '4h',
    targetTimeframe: '2d',
    definition: 'Short setup at major Fibonacci resistance',
    requiredIndicators: ['fibonacci', 'volume', 'momentum'],
    conditions: [
    {
    indicator: 'price',
    condition: 'NEAR_FIBO_LEVEL',
    value: [0.618, 0.786, 1.0],
    },
    {
    indicator: 'price.action',
    condition: 'REJECTING',
    lookback: 3,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 6,
    },
    {
    type: 'MOMENTUM',
    condition: 'NEGATIVE',
    lookback: 2,
    },
    ],
    };

Flag Patterns (23-24)

  1. FLAGPOLE_CONTINUATION_BUY_MARKET_TP_IN_12H

    const FLAGPOLE_CONTINUATION_BUY: MarketCondition = {
    name: 'FLAGPOLE_CONTINUATION_BUY_MARKET_TP_IN_12H',
    type: 'BUY',
    timeframe: '1h',
    targetTimeframe: '12h',
    definition: 'Bullish flag formation after sharp climb',
    requiredIndicators: ['pattern_recognition', 'volume', 'momentum'],
    conditions: [
    {
    indicator: 'pattern.flag',
    condition: 'BULLISH',
    lookback: 12,
    },
    {
    indicator: 'pattern.pole',
    condition: 'STRONG_BULLISH',
    lookback: 1,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'BREAKOUT_VOLUME',
    lookback: 3,
    },
    {
    type: 'PRICE',
    condition: 'ABOVE_FLAG_RESISTANCE',
    lookback: 1,
    },
    ],
    };
  2. FLAGPOLE_FAILURE_SELL_MARKET_TP_IN_12H

    const FLAGPOLE_FAILURE_SELL: MarketCondition = {
    name: 'FLAGPOLE_FAILURE_SELL_MARKET_TP_IN_12H',
    type: 'SELL',
    timeframe: '1h',
    targetTimeframe: '12h',
    definition: 'Failed bull flag breakout',
    requiredIndicators: ['pattern_recognition', 'volume', 'momentum'],
    conditions: [
    {
    indicator: 'pattern.flag',
    condition: 'FAILED_BULLISH',
    lookback: 12,
    },
    {
    indicator: 'volume',
    condition: 'DECREASING',
    lookback: 3,
    },
    ],
    confirmationRules: [
    {
    type: 'PRICE',
    condition: 'BELOW_FLAG_SUPPORT',
    lookback: 1,
    },
    {
    type: 'MOMENTUM',
    condition: 'WEAKENING',
    lookback: 3,
    },
    ],
    };

Gann Patterns (25-26)

  1. GANN_REVERSAL_BUY_MARKET_TP_IN_3D

    const GANN_REVERSAL_BUY: MarketCondition = {
    name: 'GANN_REVERSAL_BUY_MARKET_TP_IN_3D',
    type: 'BUY',
    timeframe: '4h',
    targetTimeframe: '3d',
    definition: 'Gann angle-based bullish reversal',
    requiredIndicators: ['gann_angles', 'volume', 'time_analysis'],
    conditions: [
    {
    indicator: 'gann.angle',
    condition: 'SUPPORT_BOUNCE',
    value: 45,
    },
    {
    indicator: 'gann.square',
    condition: 'TIME_PRICE_MATCH',
    lookback: 1,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 6,
    },
    {
    type: 'MOMENTUM',
    condition: 'REVERSAL_STRENGTH',
    lookback: 3,
    },
    ],
    };
  2. GANN_REVERSAL_SELL_MARKET_TP_IN_3D

    const GANN_REVERSAL_SELL: MarketCondition = {
    name: 'GANN_REVERSAL_SELL_MARKET_TP_IN_3D',
    type: 'SELL',
    timeframe: '4h',
    targetTimeframe: '3d',
    definition: 'Gann angle-based bearish reversal',
    requiredIndicators: ['gann_angles', 'volume', 'time_analysis'],
    conditions: [
    {
    indicator: 'gann.angle',
    condition: 'RESISTANCE_REJECT',
    value: 45,
    },
    {
    indicator: 'gann.square',
    condition: 'TIME_PRICE_MATCH',
    lookback: 1,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 6,
    },
    {
    type: 'MOMENTUM',
    condition: 'REVERSAL_STRENGTH',
    lookback: 3,
    },
    ],
    };

Divergence Patterns (27-30)

  1. RSI_BULL_DIV_BUY_MARKET_TP_IN_1D

    const RSI_BULL_DIV_BUY: MarketCondition = {
    name: 'RSI_BULL_DIV_BUY_MARKET_TP_IN_1D',
    type: 'BUY',
    timeframe: '4h',
    targetTimeframe: '1d',
    definition:
    'Bullish RSI divergence with price making lower lows but RSI making higher lows',
    requiredIndicators: ['rsi', 'volume', 'price_action'],
    conditions: [
    {
    indicator: 'divergence.rsi',
    condition: 'BULLISH',
    lookback: 20,
    },
    {
    indicator: 'rsi',
    condition: 'BELOW_VALUE',
    value: 40,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 3,
    },
    {
    type: 'PRICE',
    condition: 'BOUNCE_FROM_SUPPORT',
    lookback: 1,
    },
    ],
    };
  2. RSI_BEAR_DIV_SELL_MARKET_TP_IN_1D

    const RSI_BEAR_DIV_SELL: MarketCondition = {
    name: 'RSI_BEAR_DIV_SELL_MARKET_TP_IN_1D',
    type: 'SELL',
    timeframe: '4h',
    targetTimeframe: '1d',
    definition:
    'Bearish RSI divergence with price making higher highs but RSI making lower highs',
    requiredIndicators: ['rsi', 'volume', 'price_action'],
    conditions: [
    {
    indicator: 'divergence.rsi',
    condition: 'BEARISH',
    lookback: 20,
    },
    {
    indicator: 'rsi',
    condition: 'ABOVE_VALUE',
    value: 60,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 3,
    },
    {
    type: 'PRICE',
    condition: 'DROP_FROM_RESISTANCE',
    lookback: 1,
    },
    ],
    };
  3. MACD_BULL_DIV_BUY_MARKET_TP_IN_2D

    const MACD_BULL_DIV_BUY: MarketCondition = {
    name: 'MACD_BULL_DIV_BUY_MARKET_TP_IN_2D',
    type: 'BUY',
    timeframe: '4h',
    targetTimeframe: '2d',
    definition:
    'Bullish MACD divergence with price making lower lows but MACD histogram making higher lows',
    requiredIndicators: ['macd', 'volume', 'price_action'],
    conditions: [
    {
    indicator: 'divergence.macd',
    condition: 'BULLISH',
    lookback: 20,
    },
    {
    indicator: 'macd.histogram',
    condition: 'INCREASING',
    lookback: 3,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 3,
    },
    {
    type: 'MOMENTUM',
    condition: 'STRENGTHENING',
    lookback: 3,
    },
    ],
    };
  4. MACD_BEAR_DIV_SELL_MARKET_TP_IN_2D

    const MACD_BEAR_DIV_SELL: MarketCondition = {
    name: 'MACD_BEAR_DIV_SELL_MARKET_TP_IN_2D',
    type: 'SELL',
    timeframe: '4h',
    targetTimeframe: '2d',
    definition:
    'Bearish MACD divergence with price making higher highs but MACD histogram making lower highs',
    requiredIndicators: ['macd', 'volume', 'price_action'],
    conditions: [
    {
    indicator: 'divergence.macd',
    condition: 'BEARISH',
    lookback: 20,
    },
    {
    indicator: 'macd.histogram',
    condition: 'DECREASING',
    lookback: 3,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'INCREASING',
    lookback: 3,
    },
    {
    type: 'MOMENTUM',
    condition: 'WEAKENING',
    lookback: 3,
    },
    ],
    };

Volume Patterns (31-34)

  1. VOLUME_CLIMAX_BUY_MARKET_TP_IN_8H

    const VOLUME_CLIMAX_BUY: MarketCondition = {
    name: 'VOLUME_CLIMAX_BUY_MARKET_TP_IN_8H',
    type: 'BUY',
    timeframe: '15m',
    targetTimeframe: '8h',
    definition:
    'Volume climax after sharp decline, indicating potential reversal',
    requiredIndicators: ['volume', 'price_action', 'volatility'],
    conditions: [
    {
    indicator: 'volume',
    condition: 'CLIMAX',
    lookback: 24,
    value: 200, // 200% above average
    },
    {
    indicator: 'price.trend',
    condition: 'OVERSOLD',
    lookback: 12,
    },
    ],
    confirmationRules: [
    {
    type: 'PRICE',
    condition: 'HAMMER_CANDLE',
    lookback: 1,
    },
    {
    type: 'VOLATILITY',
    condition: 'DECREASING',
    lookback: 3,
    },
    ],
    };
  2. VOLUME_CLIMAX_SELL_MARKET_TP_IN_8H

    const VOLUME_CLIMAX_SELL: MarketCondition = {
    name: 'VOLUME_CLIMAX_SELL_MARKET_TP_IN_8H',
    type: 'SELL',
    timeframe: '15m',
    targetTimeframe: '8h',
    definition:
    'Volume climax after sharp rise, indicating potential reversal',
    requiredIndicators: ['volume', 'price_action', 'volatility'],
    conditions: [
    {
    indicator: 'volume',
    condition: 'CLIMAX',
    lookback: 24,
    value: 200, // 200% above average
    },
    {
    indicator: 'price.trend',
    condition: 'OVERBOUGHT',
    lookback: 12,
    },
    ],
    confirmationRules: [
    {
    type: 'PRICE',
    condition: 'SHOOTING_STAR',
    lookback: 1,
    },
    {
    type: 'VOLATILITY',
    condition: 'DECREASING',
    lookback: 3,
    },
    ],
    };
  3. VOLUME_BREAKOUT_BUY_MARKET_TP_IN_4H

    const VOLUME_BREAKOUT_BUY: MarketCondition = {
    name: 'VOLUME_BREAKOUT_BUY_MARKET_TP_IN_4H',
    type: 'BUY',
    timeframe: '5m',
    targetTimeframe: '4h',
    definition: 'High volume breakout above resistance with follow-through',
    requiredIndicators: ['volume', 'price_action', 'support_resistance'],
    conditions: [
    {
    indicator: 'volume',
    condition: 'BREAKOUT',
    lookback: 12,
    value: 150, // 150% above average
    },
    {
    indicator: 'price.breakout',
    condition: 'ABOVE_RESISTANCE',
    lookback: 1,
    },
    ],
    confirmationRules: [
    {
    type: 'PRICE',
    condition: 'HOLDING_BREAKOUT',
    lookback: 3,
    },
    {
    type: 'MOMENTUM',
    condition: 'INCREASING',
    lookback: 3,
    },
    ],
    };
  4. VOLUME_BREAKDOWN_SELL_MARKET_TP_IN_4H

    const VOLUME_BREAKDOWN_SELL: MarketCondition = {
    name: 'VOLUME_BREAKDOWN_SELL_MARKET_TP_IN_4H',
    type: 'SELL',
    timeframe: '5m',
    targetTimeframe: '4h',
    definition: 'High volume breakdown below support with follow-through',
    requiredIndicators: ['volume', 'price_action', 'support_resistance'],
    conditions: [
    {
    indicator: 'volume',
    condition: 'BREAKDOWN',
    lookback: 12,
    value: 150, // 150% above average
    },
    {
    indicator: 'price.breakout',
    condition: 'BELOW_SUPPORT',
    lookback: 1,
    },
    ],
    confirmationRules: [
    {
    type: 'PRICE',
    condition: 'HOLDING_BREAKDOWN',
    lookback: 3,
    },
    {
    type: 'MOMENTUM',
    condition: 'DECREASING',
    lookback: 3,
    },
    ],
    };

Volatility Patterns (35-38)

  1. VOLATILITY_SQUEEZE_BUY_MARKET_TP_IN_12H

    const VOLATILITY_SQUEEZE_BUY: MarketCondition = {
    name: 'VOLATILITY_SQUEEZE_BUY_MARKET_TP_IN_12H',
    type: 'BUY',
    timeframe: '15m',
    targetTimeframe: '12h',
    definition:
    'Bollinger Bands and Keltner Channel squeeze with bullish breakout',
    requiredIndicators: ['bollinger_bands', 'keltner_channels', 'momentum'],
    conditions: [
    {
    indicator: 'volatility.squeeze',
    condition: 'ACTIVE',
    lookback: 20,
    },
    {
    indicator: 'momentum',
    condition: 'INCREASING',
    lookback: 3,
    },
    ],
    confirmationRules: [
    {
    type: 'PRICE',
    condition: 'ABOVE_UPPER_BB',
    lookback: 1,
    },
    {
    type: 'VOLUME',
    condition: 'BREAKOUT_VOLUME',
    lookback: 3,
    },
    ],
    };
  2. VOLATILITY_SQUEEZE_SELL_MARKET_TP_IN_12H

    const VOLATILITY_SQUEEZE_SELL: MarketCondition = {
    name: 'VOLATILITY_SQUEEZE_SELL_MARKET_TP_IN_12H',
    type: 'SELL',
    timeframe: '15m',
    targetTimeframe: '12h',
    definition:
    'Bollinger Bands and Keltner Channel squeeze with bearish breakout',
    requiredIndicators: ['bollinger_bands', 'keltner_channels', 'momentum'],
    conditions: [
    {
    indicator: 'volatility.squeeze',
    condition: 'ACTIVE',
    lookback: 20,
    },
    {
    indicator: 'momentum',
    condition: 'DECREASING',
    lookback: 3,
    },
    ],
    confirmationRules: [
    {
    type: 'PRICE',
    condition: 'BELOW_LOWER_BB',
    lookback: 1,
    },
    {
    type: 'VOLUME',
    condition: 'BREAKOUT_VOLUME',
    lookback: 3,
    },
    ],
    };
  3. ATR_EXPANSION_BUY_MARKET_TP_IN_6H

    const ATR_EXPANSION_BUY: MarketCondition = {
    name: 'ATR_EXPANSION_BUY_MARKET_TP_IN_6H',
    type: 'BUY',
    timeframe: '5m',
    targetTimeframe: '6h',
    definition: 'Rapid ATR expansion with bullish price action',
    requiredIndicators: ['atr', 'price_action', 'volume'],
    conditions: [
    {
    indicator: 'atr',
    condition: 'EXPANDING',
    lookback: 12,
    value: 150, // 150% expansion
    },
    {
    indicator: 'price.trend',
    condition: 'BULLISH',
    lookback: 3,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'ABOVE_AVERAGE',
    lookback: 3,
    },
    {
    type: 'MOMENTUM',
    condition: 'INCREASING',
    lookback: 3,
    },
    ],
    };
  4. ATR_EXPANSION_SELL_MARKET_TP_IN_6H

    const ATR_EXPANSION_SELL: MarketCondition = {
    name: 'ATR_EXPANSION_SELL_MARKET_TP_IN_6H',
    type: 'SELL',
    timeframe: '5m',
    targetTimeframe: '6h',
    definition: 'Rapid ATR expansion with bearish price action',
    requiredIndicators: ['atr', 'price_action', 'volume'],
    conditions: [
    {
    indicator: 'atr',
    condition: 'EXPANDING',
    lookback: 12,
    value: 150, // 150% expansion
    },
    {
    indicator: 'price.trend',
    condition: 'BEARISH',
    lookback: 3,
    },
    ],
    confirmationRules: [
    {
    type: 'VOLUME',
    condition: 'ABOVE_AVERAGE',
    lookback: 3,
    },
    {
    type: 'MOMENTUM',
    condition: 'DECREASING',
    lookback: 3,
    },
    ],
    };

Trend Patterns (39-42)

  1. TREND_CONTINUATION_BUY_MARKET_TP_IN_1D

    const TREND_CONTINUATION_BUY: MarketCondition = {
    name: 'TREND_CONTINUATION_BUY_MARKET_TP_IN_1D',
    type: 'BUY',
    timeframe: '1h',
    targetTimeframe: '1d',
    definition:
    'Strong uptrend continuation after pullback to moving average',
    requiredIndicators: ['moving_averages', 'adx', 'momentum'],
    conditions: [
    {
    indicator: 'adx',
    condition: 'STRONG_TREND',
    value: 25,
    },
    {
    indicator: 'price.ma',
    condition: 'BOUNCE_FROM_MA',
    lookback: 3,
    value: 20, // 20-period MA
    },
    ],
    confirmationRules: [
    {
    type: 'MOMENTUM',
    condition: 'INCREASING',
    lookback: 3,
    },
    {
    type: 'VOLUME',
    condition: 'ABOVE_AVERAGE',
    lookback: 3,
    },
    ],
    };
  2. TREND_CONTINUATION_SELL_MARKET_TP_IN_1D

    const TREND_CONTINUATION_SELL: MarketCondition = {
    name: 'TREND_CONTINUATION_SELL_MARKET_TP_IN_1D',
    type: 'SELL',
    timeframe: '1h',
    targetTimeframe: '1d',
    definition:
    'Strong downtrend continuation after bounce to moving average',
    requiredIndicators: ['moving_averages', 'adx', 'momentum'],
    conditions: [
    {
    indicator: 'adx',
    condition: 'STRONG_TREND',
    value: 25,
    },
    {
    indicator: 'price.ma',
    condition: 'DROP_FROM_MA',
    lookback: 3,
    value: 20, // 20-period MA
    },
    ],
    confirmationRules: [
    {
    type: 'MOMENTUM',
    condition: 'DECREASING',
    lookback: 3,
    },
    {
    type: 'VOLUME',
    condition: 'ABOVE_AVERAGE',
    lookback: 3,
    },
    ],
    };
  3. TREND_REVERSAL_BUY_MARKET_TP_IN_2D

    const TREND_REVERSAL_BUY: MarketCondition = {
    name: 'TREND_REVERSAL_BUY_MARKET_TP_IN_2D',
    type: 'BUY',
    timeframe: '4h',
    targetTimeframe: '2d',
    definition: 'Downtrend reversal with multiple confirmation signals',
    requiredIndicators: ['moving_averages', 'rsi', 'macd', 'volume'],
    conditions: [
    {
    indicator: 'ma.cross',
    condition: 'BULLISH',
    lookback: 1,
    },
    {
    indicator: 'rsi',
    condition: 'OVERSOLD_RECOVERY',
    value: 30,
    },
    ],
    confirmationRules: [
    {
    type: 'MACD',
    condition: 'BULLISH_CROSS',
    lookback: 1,
    },
    {
    type: 'VOLUME',
    condition: 'REVERSAL_VOLUME',
    lookback: 3,
    },
    ],
    };
  4. TREND_REVERSAL_SELL_MARKET_TP_IN_2D

    const TREND_REVERSAL_SELL: MarketCondition = {
    name: 'TREND_REVERSAL_SELL_MARKET_TP_IN_2D',
    type: 'SELL',
    timeframe: '4h',
    targetTimeframe: '2d',
    definition: 'Uptrend reversal with multiple confirmation signals',
    requiredIndicators: ['moving_averages', 'rsi', 'macd', 'volume'],
    conditions: [
    {
    indicator: 'ma.cross',
    condition: 'BEARISH',
    lookback: 1,
    },
    {
    indicator: 'rsi',
    condition: 'OVERBOUGHT_REVERSAL',
    value: 70,
    },
    ],
    confirmationRules: [
    {
    type: 'MACD',
    condition: 'BEARISH_CROSS',
    lookback: 1,
    },
    {
    type: 'VOLUME',
    condition: 'REVERSAL_VOLUME',
    lookback: 3,
    },
    ],
    };

Integration with Mercury Bot

Now that we have defined our 42 market conditions, let's discuss how to integrate them into Mercury Bot's analysis system. The implementation will follow these key steps:

  1. Condition Detection System

    interface ConditionDetector {
    detect(market: string, timeframe: string): Promise<DetectedCondition[]>;
    validateConditions(conditions: Condition[]): boolean;
    calculateConfidence(condition: MarketCondition): number;
    }
  2. Confidence Scoring

    • Each condition has weighted components
    • Primary conditions (70% weight)
    • Confirmation rules (30% weight)
    • Minimum confidence threshold: 80%
  3. Time-Based Exit Strategy

    interface TimeBasedExit {
    targetTimeframe: string;
    initialStopLoss: number;
    trailingStop: number;
    timeBasedExit: boolean;
    }
  4. Implementation Phases

    • Phase 1: Core indicator calculations
    • Phase 2: Pattern recognition systems
    • Phase 3: Time-based exit strategies
    • Phase 4: Machine learning enhancements
  5. Usage Example

    const detector = new MarketConditionDetector();
    const conditions = await detector.detect('BTCUSDT', '1h');

    if (conditions.length > 0) {
    const highestConfidence = conditions.reduce((prev, curr) =>
    curr.confidence > prev.confidence ? curr : prev,
    );

    console.log(`Detected ${conditions.length} conditions`);
    console.log(`Best condition: ${highestConfidence.name}`);
    console.log(`Confidence: ${highestConfidence.confidence}%`);
    }

Future Enhancements

  1. Machine Learning Integration

    • Train models to recognize pattern variations
    • Adaptive confidence scoring
    • Historical performance analysis
  2. Advanced Time-Based Features

    • Dynamic timeframe selection
    • Market regime detection
    • Seasonal adjustments
  3. Risk Management

    • Position sizing based on confidence
    • Multiple timeframe confirmation
    • Correlation analysis
  4. Performance Tracking

    • Success rate by condition type
    • Time-based performance metrics
    • Risk-adjusted returns

Conclusion

These 42 market conditions provide a comprehensive framework for automated trading decisions in Mercury Bot. By combining technical indicators, price action, and time-based targets, we create a robust system for identifying high-probability trading opportunities. The implementation focuses on maintainability, extensibility, and real-world applicability.

Remember that these conditions should be used as part of a complete trading strategy that includes proper risk management and position sizing. The time-based targets provide a structured approach to exits, but they should be combined with other risk management techniques for optimal results.


Note: Always use proper risk management and consider market conditions before trading. These conditions should be part of a comprehensive trading strategy.