EMA (Exponential Moving Average)
The EMA (Exponential Moving Average) is another type of moving average that gives more weight to the most recent price data. This makes it more responsive to recent price changes than the Simple Moving Average (SMA). EMAs are commonly used to identify the direction of a trend and to generate buy and sell signals.
Arguments
| Name | Description |
|---|---|
period | number of candles |
Useful Signal Expressions
1. EMA Crossover (Bullish)
Signal:
close().ema(12).crosses_above(close().ema(26))
Explanation: The 12-period EMA crosses above the 26-period EMA. This is a common bullish signal.
2. EMA Crossover (Bearish)
Signal:
close().ema(12).crosses_below(close().ema(26))
Explanation: The 12-period EMA crosses below the 26-period EMA. This is a common bearish signal.
3. Price and EMA
Signal:
close().gt(close().ema(50))
Explanation: The closing price is above the 50-period EMA, indicating a medium-term uptrend.
