EMA (Exponential Moving Average)
EMA draws a smoothed line over price that emphasizes recent data. It shows your agent the direction and strength of a trend by filtering out short-term noise — and stacking multiple EMAs together gives it a complete picture of market structure.
What EMA Tells Your Agent
A single EMA shows the trend: price above it means bullish, below means bearish. But the real power comes from using multiple EMAs at different periods:
- 9 EMA — The fast line. Reacts quickly to price. Shows immediate momentum.
- 21 EMA — The medium line. Defines the short-term trend.
- 50 EMA — The swing anchor. Shows the intermediate trend.
- 200 EMA — The big picture. The trend filter that professional traders watch.
When these stack up in order (9 above 21 above 50 above 200), the trend is strong and bullish. When they're reversed, it's bearish. When they're tangled and crossing each other, the market is choppy — and your agent knows to be cautious.
How Your Agent Calls EMA
This is where EMA gets interesting. Unlike most indicators, your agent has direct control over which periods to calculate.
The agent sends:
- Timeframe — Which chart to analyze (5-minute, 1-hour, daily, etc.)
- Periods — An array of EMA periods to calculate (e.g.
[9, 21, 50, 200])
The agent gets back:
ema_9: 47,250.23ema_21: 47,180.45ema_50: 46,920.10ema_200: 45,100.88
From four numbers the agent instantly knows: all EMAs are stacked bullish, price is trending up, and the 9 EMA is pulling away from the 21 — momentum is accelerating.
The agent chooses the periods that matter for its strategy. An EMA God agent might request all four. A Basic Cross agent might only need [9, 21].
Multi-Timeframe EMA
Your agent can call EMA on different timeframes in the same analysis:
- Daily EMA 200 at $45,100 — Long-term trend is up
- 1-hour EMA 50 at $46,920 — Intermediate trend is up
- 5-minute EMA 9 at $47,250 — Short-term momentum is strong
This top-down view is exactly how professional traders think. Start with the big picture, then zoom in for timing. Your agent does this automatically, guided by your strategy.
A strategy that says "only take 5-minute entries when the daily 200 EMA confirms the trend" will make the agent check both timeframes before every trade.
What EMA Is Good For
Trend following — EMAs are the backbone of trend trading. When EMAs are stacked and sloping in one direction, the trend is clear. Your agent can ride it with confidence.
Crossover signals — When the 9 EMA crosses above the 21 EMA, short-term momentum has shifted bullish. This is one of the most traded signals in markets, and your agent can catch every one.
Dynamic support/resistance — In an uptrend, price tends to bounce off key EMAs. The 9 EMA acts as immediate support, the 21 as a pullback zone, and the 50 as a deeper bounce level. Your agent can buy these touches.
What EMA Isn't Good For
EMAs lag price — they're based on past data. In choppy, sideways markets, EMAs will cross back and forth constantly, generating false signals. That's why pairing EMA with a momentum indicator like RSI or MACD helps filter the noise.
Next Steps
- RSI — Add overbought/oversold context
- MACD — Confirm momentum shifts
- Understanding Indicators — Inputs, outputs, and multi-timeframe analysis