Skip to main content
PriceSignal includes a comprehensive technical analysis engine that calculates popular indicators in real-time as price data streams in. Use these indicators to create sophisticated alert rules based on market momentum, trends, and volatility.

Supported Indicators

PriceSignal currently supports three core technical indicators, with more being added regularly:

RSI

Relative Strength Index - momentum oscillator

SMA

Simple Moving Average - trend indicator

EMA

Exponential Moving Average - weighted trend

RSI (Relative Strength Index)

The RSI is a momentum oscillator that measures the speed and magnitude of price changes. It oscillates between 0 and 100, with traditional interpretations:
  • Above 70: Overbought conditions (potential sell signal)
  • Below 30: Oversold conditions (potential buy signal)
  • 50: Neutral momentum

RSI Alert Example

Create an alert when RSI enters oversold territory:
mutation CreateRSIAlert {
  createPriceRule(input: {
    name: "BTC RSI Oversold"
    description: "Alert when Bitcoin RSI drops below 30 (14-period)"
    instrumentId: "550e8400-e29b-41d4-a716-446655440000"
    notificationChannel: "TELEGRAM"
    isEnabled: true
    conditions: [{
      conditionType: "TECHNICAL_INDICATOR"
      value: 30
      additionalValues: "{\"indicator\": \"RSI\", \"period\": 14, \"comparison\": \"below\"}"
    }]
  }) {
    id
    name
    conditions {
      nodes {
        conditionType
        value
        additionalValues
      }
    }
  }
}

RSI Configuration

{
  "indicator": "RSI",
  "period": 14,
  "comparison": "below",
  "value": 30
}
Triggers when 14-period RSI falls below 30
The RSI calculation requires at least period + 1 price data points. For a 14-period RSI, you need at least 15 historical prices.

SMA (Simple Moving Average)

The Simple Moving Average calculates the arithmetic mean of prices over a specified period. It’s useful for:
  • Identifying trend direction
  • Support and resistance levels
  • Crossover strategies
  • Smoothing price noise

SMA Usage

SMA is typically used in crossover conditions rather than direct indicator alerts:
{
  "conditionType": "PRICE_CROSSOVER",
  "value": 0,
  "additionalValues": "{\"type\": \"price_ma\", \"ma_type\": \"SMA\", \"period\": 50, \"direction\": \"above\"}"
}

Common SMA Periods

Use Case: Day trading and short-term swing trading
  • 5 SMA: Very responsive to price changes, generates many signals
  • 10 SMA: Balanced short-term trend indicator
  • 20 SMA: Popular for identifying short-term support/resistance
Good for volatile markets where you want quick signals.
Use Case: Swing trading and position management
  • 50 SMA: Standard medium-term trend indicator
  • 100 SMA: Intermediate trend confirmation
Provides a balance between responsiveness and noise filtering.
Use Case: Position trading and trend confirmation
  • 200 SMA: The most widely watched long-term indicator
  • Price above 200 SMA = bullish trend
  • Price below 200 SMA = bearish trend
Best for identifying major trend changes and long-term positioning.

EMA (Exponential Moving Average)

The Exponential Moving Average gives more weight to recent prices, making it more responsive to new information than the SMA.

EMA vs SMA

SMA Characteristics

  • Equal weight to all periods
  • Smoother line
  • Slower to react
  • Better for long-term trends

EMA Characteristics

  • More weight to recent data
  • More responsive
  • Faster signals
  • Better for short-term trading

EMA Alert Examples

mutation CreateEMABullishAlert {
  createPriceRule(input: {
    name: "ETH Above 20 EMA"
    description: "Alert when Ethereum price crosses above 20 EMA"
    instrumentId: "..."
    notificationChannel: "EMAIL"
    conditions: [{
      conditionType: "PRICE_CROSSOVER"
      value: 0
      additionalValues: "{\"type\": \"price_ma\", \"ma_type\": \"EMA\", \"period\": 20, \"direction\": \"above\"}"
    }]
  }) { id name }
}

Crossover Strategies

Crossover strategies are among the most popular technical analysis approaches. PriceSignal supports two types:

1. Price-MA Crossover

Triggers when the price crosses above or below a moving average:
{
  "type": "price_ma",
  "ma_type": "EMA",
  "period": 20,
  "direction": "above"
}
Interpretation:
  • Bullish Signal: Price crosses above MA (upward momentum)
  • Bearish Signal: Price crosses below MA (downward momentum)

2. MA-MA Crossover

Triggers when a fast-moving average crosses a slow-moving average:
{
  "type": "ma_cross",
  "ma_type": "SMA",
  "fast_ma": 50,
  "slow_ma": 200,
  "direction": "above"
}
Famous Crossovers:

Golden Cross

50 MA crosses above 200 MAStrong bullish signal indicating potential long-term uptrend

Death Cross

50 MA crosses below 200 MAStrong bearish signal indicating potential long-term downtrend

Complete Crossover Example

mutation CreateGoldenCrossAlert {
  createPriceRule(input: {
    name: "BTC Golden Cross"
    description: "Alert on bullish 50/200 SMA crossover"
    instrumentId: "550e8400-e29b-41d4-a716-446655440000"
    notificationChannel: "TELEGRAM"
    isEnabled: true
    conditions: [{
      conditionType: "PRICE_CROSSOVER"
      value: 0
      additionalValues: "{\"type\": \"ma_cross\", \"ma_type\": \"SMA\", \"fast_ma\": 50, \"slow_ma\": 200, \"direction\": \"above\"}"
    }]
  }) {
    id
    name
    conditions {
      nodes {
        conditionType
        value
        additionalValues
      }
    }
  }
}

Indicator Calculation

All indicators are calculated using the battle-tested Skender.Stock.Indicators library, ensuring:
  • Accuracy: Industry-standard calculations
  • Performance: Optimized for real-time processing
  • Reliability: Extensively tested and validated
  1. Price Collection: Historical prices are retrieved from the database
  2. Period Validation: System ensures sufficient data points exist
  3. Calculation: Indicator library processes the price series
  4. Result Extraction: Latest indicator value is returned
  5. Comparison: Value is compared against your configured threshold
  6. Trigger: Rule triggers if condition is met
All calculations happen in real-time as new price data arrives.

Technical Requirements

Data Requirements: Each indicator needs a minimum number of historical data points:
  • RSI: period + 1 prices (15 for RSI-14)
  • SMA: period prices (50 for SMA-50)
  • EMA: period prices (20 for EMA-20)
  • Crossovers: Enough data for both moving averages
Rules won’t trigger until sufficient historical data exists.

Data Availability

Before creating indicator-based rules:
  1. Ensure the instrument has been tracked for the required period
  2. Consider creating a simple price alert first to verify data flow
  3. Monitor the activation logs to confirm indicator calculations are working
  4. Start with shorter periods during testing

Advanced Strategies

Multi-Indicator Confirmation

Create separate rules for different indicators and correlate their signals:
mutation CreateMultiIndicatorStrategy {
  # RSI oversold alert
  rsi: createPriceRule(input: {
    name: "BTC RSI Oversold"
    instrumentId: "..."
    notificationChannel: "TELEGRAM"
    conditions: [{
      conditionType: "TECHNICAL_INDICATOR"
      value: 30
      additionalValues: "{\"indicator\": \"RSI\", \"period\": 14, \"comparison\": \"below\"}"
    }]
  }) { id }
  
  # Price above 200 EMA (trend confirmation)
  ema: createPriceRule(input: {
    name: "BTC Above 200 EMA"
    instrumentId: "..."
    notificationChannel: "TELEGRAM"
    conditions: [{
      conditionType: "PRICE_CROSSOVER"
      value: 0
      additionalValues: "{\"type\": \"price_ma\", \"ma_type\": \"EMA\", \"period\": 200, \"direction\": \"above\"}"
    }]
  }) { id }
}
When both alerts trigger within a short timeframe, you have confirmed confluence: oversold RSI in an uptrend.

Period Optimization

Test different periods to find what works for your strategy:
  • RSI: 7-9 period
  • EMA: 8-12 period
  • SMA: 10-20 period
Pros: Quick signals, catches short-term movesCons: More false signals, requires active monitoring
Always backtest your indicator settings on historical data before relying on them for trading decisions. What works for one asset may not work for another.

Best Practices

  1. Start Simple: Begin with standard periods (RSI-14, 50/200 SMA)
  2. Combine Indicators: Use multiple indicators for confirmation
  3. Consider Timeframes: Match indicator periods to your trading style
  4. Monitor Performance: Review activation logs to tune settings
  5. Avoid Over-Optimization: Don’t curve-fit to historical data
  6. Account for Volatility: Adjust thresholds for different market conditions
Technical indicators are tools, not crystal balls. Always use proper risk management and never rely on a single indicator for trading decisions.

Build docs developers (and LLMs) love