📈 Indicator Blocks Reference

Technical indicators for analyzing price trends and market conditions

Overview

Indicator blocks calculate technical analysis values from price data. These blocks help you identify trends, momentum, overbought/oversold conditions, and potential reversal points. Indicators follow the timeframe and price value of their Data: Ticker input and update based on its price timing.

Indicator: SMA

BASIC

Simple Moving Average (SMA) - Calculates the average price over a specified period. Smooths out price action and identifies trend direction.

What it does
  • Averages the last N closing prices
  • Smooths out short-term price fluctuations
  • Identifies overall trend direction
  • Acts as support/resistance levels
When to use
  • Trend-following strategies
  • Moving average crossovers
  • Dynamic support/resistance identification
  • Position entry/exit signals
📋 Example: Golden Cross Strategy
Strategy: Buy when short-term SMA crosses above long-term SMA (bullish signal)
1. source1 = Data: Ticker (SPY, 1d)
2. sma1 = Indicator: SMA (source1, length=50)
3. sma2 = Indicator: SMA (source1, length=200)
4. crossover1 = Condition: Cross Over (sma1, sma2)
5. crossover2 = Condition: Cross Over (sma2, sma1)
6. buy1 = Action: Buy (cash=$10,000, when=crossover1)
7. sell1 = Action: Sell (sell_all_from=buy1, when=crossover2)
💡 Common Periods: 20 (short-term), 50 (medium-term), 200 (long-term trend)

Indicator: EMA

BASIC

Exponential Moving Average (EMA) - Weighted average that gives more importance to recent prices. More responsive to price changes than SMA.

What it does
  • Weights recent prices more heavily
  • Responds faster to price changes than SMA
  • Reduces lag in trend identification
  • Better for fast-moving markets
When to use
  • Short-term trading strategies
  • Quick trend reversals
  • Day trading and scalping
  • Volatile markets requiring faster signals
📋 Example: EMA Crossover Day Trading
Strategy: Trade intraday EMA crossovers for quick profits
1. source1 = Data: Ticker (AAPL, 1m)
2. ema1 = Indicator: EMA (source1, length=9)
3. ema2 = Indicator: EMA (source1, length=21)
4. crossover1 = Condition: Cross Over (ema1, ema2)
5. crossover2 = Condition: Cross Over (ema2, ema1)
6. buy1 = Action: Buy (symbol=AAPL, 100 shares, when=crossover1)
7. sell1 = Action: Sell (sell_all_from=buy1, when=crossover2)
💡 EMA vs SMA: Use EMA when you want faster signals. Use SMA for smoother, more stable trends.

Indicator: Kalman Filter

SMOOTHING

Kalman Filter - Adaptive smoothing filter that reduces noise while tracking trend shifts. Useful for cleaner signals in choppy markets.

What it does
  • Smooths price with adaptive weighting
  • Reduces whipsaw noise
  • Tracks trend changes faster than SMA
  • Outputs a filtered price series
When to use
  • Noisy or range-bound markets
  • Pre-smoothing before crossovers
  • Trend filters for intraday strategies
  • Signal cleanup for fast indicators
📋 Example: Filtered Trend Signal
Strategy: Use the filtered line as a trend guide
1. source1 = Data: Ticker (QQQ, 1m)
2. kf1 = Indicator: Kalman Filter (source1, length=20)
3. sma1 = Indicator: SMA (source1, length=50)
4. gt1 = Condition: A > B (kf1, sma1)
5. lt1 = Condition: A < B (kf1, sma1)
6. buy1 = Action: Buy (cash=$10,000, when=gt1)
7. sell1 = Action: Sell (sell_all_from=buy1, when=lt1)
💡 Tip: Compare filtered price vs raw price to reduce false crossovers.

Indicator: RSI

BASIC

Relative Strength Index (RSI) - Momentum oscillator that measures the speed and magnitude of price changes. Values range from 0 to 100.

What it does
  • Identifies overbought (RSI > 70) conditions
  • Identifies oversold (RSI < 30) conditions
  • Detects potential reversal points
  • Measures momentum strength
When to use
  • Mean reversion strategies
  • Overbought/oversold trading
  • Divergence detection
  • Entry/exit timing
📋 Example: RSI Mean Reversion
Strategy: Buy oversold conditions, sell overbought conditions
1. source1 = Data: Ticker (TSLA, 1m)
2. rsi1 = Indicator: RSI (source1, length=14)
3. lt1 = Condition: A < B (rsi1, 30)
4. gt1 = Condition: A > B (rsi1, 70)
5. buy1 = Action: Buy (cash=$5,000, when=lt1)
6. sell1 = Action: Sell (sell_all_from=buy1, when=gt1)
⚠️ Watch Out: In strong trends, RSI can stay overbought/oversold for extended periods. Combine with trend indicators for better accuracy.

Indicator: MACD

BASIC

Moving Average Convergence Divergence (MACD) - Trend-following momentum indicator showing the relationship between two EMAs. Consists of MACD line, Signal line, and Histogram.

What it does
  • MACD Line block = EMA(12) - EMA(26)
  • MACD Signal block = EMA(MACD, 9)
  • MACD Histogram block = MACD - Signal
  • Identifies trend direction and momentum
When to use
  • Trend following strategies
  • MACD/Signal crossovers
  • Divergence detection
  • Momentum confirmation
📋 Example: MACD Crossover Strategy
Strategy: Trade MACD line crossing signal line
1. source1 = Data: Ticker (SPY, 1m)
2. macd1 = Indicator: MACD Line (source1, 12/26/9)
3. macd_signal1 = Indicator: MACD Signal (source1, 12/26/9)
4. macd_hist1 = Indicator: MACD Histogram (source1, 12/26/9)
5. crossover1 = Condition: Cross Over (macd1, macd_signal1)
6. crossover2 = Condition: Cross Over (macd_signal1, macd1)
7. buy1 = Action: Buy (cash=$10,000, when=crossover1)
8. sell1 = Action: Sell (sell_all_from=buy1, when=crossover2)
💡 MACD Components: Use all three (MACD, Signal, Histogram) together for best results. Histogram shows momentum strength.

Indicator: Stochastic

BASIC

Stochastic Oscillator - Momentum indicator comparing closing price to price range. Values range from 0 to 100. Available as Fast %K/%D and Slow %K/%D blocks.

What it does
  • %K line = current momentum
  • %D line = smoothed %K (signal line)
  • Fast %K/%D blocks are more sensitive
  • Slow %K/%D blocks are smoother
When to use
  • Overbought/oversold conditions
  • %K/%D crossovers
  • Range-bound markets
  • Short-term reversals
📋 Example: Stochastic Reversal Strategy
Strategy: Trade oversold bounces and overbought drops
1. source1 = Data: Ticker (QQQ, 1m)
2. stoch_fast_k1 = Indicator: Stochastic (Fast) %K (source1, 14/3)
3. stoch_fast_d1 = Indicator: Stochastic (Fast) %D (source1, 14/3)
4. lt1 = Condition: A < B (stoch_fast_k1, 20)
5. gt1 = Condition: A > B (stoch_fast_k1, 80)
6. crossover1 = Condition: Cross Over (stoch_fast_k1, stoch_fast_d1)
7. crossover2 = Condition: Cross Over (stoch_fast_d1, stoch_fast_k1)
8. and1 = Condition: AND (lt1, crossover1)
9. and2 = Condition: AND (gt1, crossover2)
10. buy1 = Action: Buy (cash=$10,000, when=and1)
11. sell1 = Action: Sell (sell_all_from=buy1, when=and2)
💡 Fast vs Slow: Fast Stochastic (14,3) is more responsive. Slow Stochastic (14, 3) is smoother with fewer false signals.

Quick Reference

Indicator Type Best For Key Signals
SMA Trend Smooth trends, crossovers Price above/below, MA crossovers
EMA Trend Fast-moving markets, day trading EMA crossovers, price touches
Kalman Filter Smoothing Noise reduction, trend filtering Filtered price slope, crossovers
RSI Momentum Overbought/oversold, divergence <30 oversold, >70 overbought
MACD (Line/Signal/Histogram) Trend/Momentum Trend confirmation, crossovers MACD/Signal cross, histogram
Stochastic (Fast/Slow %K/%D) Momentum Range-bound, short-term reversals %K/%D cross, <20 or >80

Common Indicator Strategies

1. Trend Following (SMA/EMA Crossover)

source1 = Data: Ticker (SPY, 1d)
sma1 = Indicator: SMA (source1, length=50)
sma2 = Indicator: SMA (source1, length=200)
gt1 = Condition: A > B (sma1, sma2) # uptrend bias
lt1 = Condition: A < B (sma1, sma2) # downtrend bias

Classic trend identification using golden/death cross

2. Mean Reversion (RSI Extremes)

source1 = Data: Ticker (SPY, 1m)
rsi1 = Indicator: RSI (source1, length=14)
lt1 = Condition: A < B (rsi1, 25)
gt1 = Condition: A > B (rsi1, 75)
gt2 = Condition: A > B (rsi1, 50)
or1 = Condition: OR (gt1, gt2)
buy1 = Action: Buy (cash=$10,000, when=lt1)
sell1 = Action: Sell (sell_all_from=buy1, when=or1)

Trade extremes in oscillating markets

3. Momentum Confirmation (MACD + RSI)

source1 = Data: Ticker (SPY, 1m)
macd1 = Indicator: MACD Line (source1, 12/26/9)
macd_signal1 = Indicator: MACD Signal (source1, 12/26/9)
rsi1 = Indicator: RSI (source1, length=14)
gt1 = Condition: A > B (macd1, macd_signal1)
gt2 = Condition: A > B (rsi1, 50)
lt1 = Condition: A < B (macd1, macd_signal1)
lt2 = Condition: A < B (rsi1, 50)
and1 = Condition: AND (gt1, gt2)
and2 = Condition: AND (lt1, lt2)
buy1 = Action: Buy (cash=$10,000, when=and1)
sell1 = Action: Sell (sell_all_from=buy1, when=and2)

Combine multiple indicators for stronger signals

4. MACD Histogram Zero Cross

source1 = Data: Ticker (SPY, 1m)
macd_hist1 = Indicator: MACD Histogram (source1, 12/26/9)
gt1 = Condition: A > B (macd_hist1, 0)
lt1 = Condition: A < B (macd_hist1, 0)
buy1 = Action: Buy (cash=$10,000, when=gt1)
sell1 = Action: Sell (sell_all_from=buy1, when=lt1)

Use the histogram crossing zero as a momentum shift signal

Best Practices

✅ Do:
  • Combine multiple indicators for confirmation
  • Adjust periods based on your trading timeframe
  • Backtest indicator settings before going live
  • Use trend indicators with momentum indicators
  • Wait for clear signals, avoid overtrading
❌ Don't:
  • Use too many indicators at once (causes confusion)
  • Ignore price action - indicators are secondary
  • Overtrade on every indicator signal
  • Use default settings without testing
  • Ignore market context and fundamentals