Trend
Trend Indicators
Trend indicators help identify the direction and strength of market movements. These indicators smooth out price action to reveal the underlying trend, making it easier to determine whether to trade with or against the market direction.
Available Trend Indicators
Moving Average (MA)
The Moving Average is one of the most fundamental technical indicators, smoothing price data to create a single flowing line that makes it easier to identify the direction of the trend.
Overview
Moving Averages calculate the average price over a specific number of periods, creating a smooth line that filters out short-term price fluctuations and highlights the underlying trend.
Types of Moving Averages
Simple Moving Average (SMA)
Calculates the arithmetic mean of prices over the specified period.
Exponential Moving Average (EMA)
Gives more weight to recent prices, making it more responsive to new information.
Weighted Moving Average (WMA)
Assigns linearly increasing weights to more recent data points.
Configuration
indicator: Moving_Average
type: EMA # SMA, EMA, or WMA
period: 20 # Number of periods
source: close # Price source (close, open, high, low)
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 20 | 1-500 | Number of periods for calculation |
type | SMA | SMA/EMA/WMA | Type of moving average |
source | close | OHLC | Price point to use |
Interpretation
Trend Direction
- Price above MA: Indicates bullish trend
- Price below MA: Indicates bearish trend
- MA sloping up: Confirms uptrend
- MA sloping down: Confirms downtrend
Support and Resistance
Moving averages often act as dynamic support in uptrends and resistance in downtrends.
Common Periods
- 20-period: Short-term trend
- 50-period: Medium-term trend
- 200-period: Long-term trend
Trading Signals
Basic Signals
- Bullish Signal: Price crosses above MA
- Bearish Signal: Price crosses below MA
Multiple MA Strategy
Use two or more MAs of different periods:
- Golden Cross: Short MA crosses above long MA (bullish)
- Death Cross: Short MA crosses below long MA (bearish)
Best Practices
Timeframe Selection
- Scalping: 5, 10, 20 periods
- Day Trading: 20, 50 periods
- Swing Trading: 50, 100, 200 periods
- Position Trading: 100, 200 periods
Market Conditions
- Works Best: Trending markets
- Avoid: Ranging/sideways markets (generates false signals)
Example Strategies
Trend Following
strategy: MA_Trend_Follow
indicators:
- Moving_Average:
period: 50
type: EMA
rules:
- Buy when price > MA and MA slope > 0
- Sell when price < MA and MA slope < 0
MA Crossover
strategy: MA_Crossover
indicators:
- Moving_Average:
period: 20
type: EMA
alias: fast_ma
- Moving_Average:
period: 50
type: EMA
alias: slow_ma
rules:
- Buy when fast_ma crosses above slow_ma
- Sell when fast_ma crosses below slow_ma
Advantages
- Simple to understand and use
- Smooths out price noise
- Clear trend identification
- Works as dynamic support/resistance
Limitations
- Lagging indicator (based on past prices)
- False signals in ranging markets
- Delayed entry/exit signals
- Less effective during high volatility
Combining with Other Indicators
Works well with:
- RSI: Confirm overbought/oversold conditions
- MACD: Validate momentum shifts
- Volume: Confirm trend strength
- Bollinger Bands: Identify volatility changes
AI Agent Configuration
For MagiaTrade AI agents:
agent_config:
indicators:
- Moving_Average:
period: 20
type: EMA
prompt: |
Generate buy signal when:
- Price crosses above 20 EMA
- Volume is above average
- RSI is not overbought (< 70)
Set stop loss 2% below entry
Set target at 2:1 risk/reward ratio
Related Indicators
Further Reading
MACD (Moving Average Convergence Divergence)
MACD shows the relationship between two moving averages of a security's price to identify trend changes and momentum shifts.
Overview
MACD is calculated by subtracting the 26-period EMA from the 12-period EMA. A 9-period EMA of the MACD line (signal line) is then plotted on top of the MACD line, which can function as a trigger for buy and sell signals.
Configuration
indicator: MACD
fast_period: 12 # Fast EMA period
slow_period: 26 # Slow EMA period
signal_period: 9 # Signal line EMA period
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
fast_period | 12 | 5-50 | Fast EMA calculation period |
slow_period | 26 | 20-100 | Slow EMA calculation period |
signal_period | 9 | 3-20 | Signal line EMA period |
Interpretation
MACD Line and Signal Line
- MACD above signal: Bullish momentum
- MACD below signal: Bearish momentum
- MACD crosses above signal: Buy signal
- MACD crosses below signal: Sell signal
Zero Line
- MACD above zero: Uptrend dominance
- MACD below zero: Downtrend dominance
- Zero line cross: Trend change confirmation
Divergence
- Bullish divergence: Price makes lower low, MACD makes higher low
- Bearish divergence: Price makes higher high, MACD makes lower high
Trading Signals
Basic Signals
- Buy: MACD crosses above signal line
- Sell: MACD crosses below signal line
- Strong buy: MACD crosses above zero line
- Strong sell: MACD crosses below zero line
Advanced Signals
- Histogram: Shows distance between MACD and signal line
- Growing histogram: Strengthening momentum
- Shrinking histogram: Weakening momentum
Best Practices
Market Conditions
- Works Best: Trending markets with clear direction
- Avoid: Ranging/choppy markets (generates false signals)
Timeframe Considerations
- Short-term: Use faster settings (8,17,9)
- Standard: Default settings (12,26,9)
- Long-term: Use slower settings (19,39,9)
Example Strategies
MACD Trend Following
strategy: MACD_Trend_Follow
indicators:
- MACD:
fast_period: 12
slow_period: 26
signal_period: 9
rules:
- Buy when MACD crosses above signal and both above zero
- Sell when MACD crosses below signal or drops below zero
MACD Divergence
strategy: MACD_Divergence
indicators:
- MACD:
fast_period: 12
slow_period: 26
signal_period: 9
rules:
- Buy on bullish divergence + MACD cross above signal
- Sell on bearish divergence + MACD cross below signal
Advantages
- Combines trend and momentum analysis
- Clear visual signals
- Effective divergence detection
- Works on all timeframes
Limitations
- Lagging indicator
- False signals in ranging markets
- Can be whipsawed in volatile conditions
- Requires confirmation from other indicators
Combining with Other Indicators
Works well with:
- Moving Averages: Trend direction confirmation
- RSI: Overbought/oversold conditions
- Volume: Confirm signal strength
- Support/Resistance: Entry/exit timing
AI Agent Configuration
For MagiaTrade AI agents:
agent_config:
indicators:
- MACD:
fast_period: 12
slow_period: 26
signal_period: 9
prompt: |
Generate buy signal when:
- MACD crosses above signal line
- Both MACD and signal are above zero line
- Volume confirms the move
Set stop loss below recent swing low
Target 2:1 risk/reward ratio
Related Indicators
Further Reading
ADX (Average Directional Index)
ADX measures trend strength regardless of direction, helping traders identify whether a market is trending or ranging.
Overview
The Average Directional Index is a non-directional indicator that measures the strength of a trend. It doesn't indicate trend direction, only how strong the current trend is.
Configuration
indicator: ADX
period: 14 # Calculation period
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 14 | 7-30 | Number of periods for calculation |
Interpretation
ADX Values
- ADX < 20: Weak or no trend (ranging market)
- ADX 20-40: Moderate trend strength
- ADX > 40: Strong trend
- ADX > 60: Very strong trend
Directional Indicators
- +DI above -DI: Bullish trend direction
- -DI above +DI: Bearish trend direction
- Wider spread: Stronger directional movement
ADX Slope
- Rising ADX: Trend is strengthening
- Falling ADX: Trend is weakening
- Flat ADX: Trend strength is stable
Trading Signals
Trend Strength Signals
- Enter trends: When ADX > 25 and rising
- Avoid ranging markets: When ADX < 20
- Strong trend continuation: ADX > 40
- Trend exhaustion: ADX > 60 and starting to fall
Directional Signals
- Bullish: +DI crosses above -DI with rising ADX
- Bearish: -DI crosses above +DI with rising ADX
Best Practices
Market Application
- Trending Markets: ADX helps identify the strongest trends
- Ranging Markets: Low ADX warns to avoid trend-following strategies
- Breakout Confirmation: Rising ADX confirms breakout validity
Timeframe Considerations
- Short-term: Use period 7-10 for faster signals
- Standard: Default period 14 works for most timeframes
- Long-term: Use period 20-25 for smoother readings
Example Strategies
ADX Trend Filter
strategy: ADX_Trend_Filter
indicators:
- ADX:
period: 14
- Moving_Average:
period: 20
type: EMA
rules:
- Only trade when ADX > 25
- Buy when price above EMA and +DI > -DI
- Sell when price below EMA and -DI > +DI
ADX Breakout
strategy: ADX_Breakout
indicators:
- ADX:
period: 14
- Bollinger_Bands:
period: 20
std_dev: 2
rules:
- Wait for ADX < 20 (ranging market)
- Buy breakout above upper band with rising ADX
- Sell breakdown below lower band with rising ADX
Advantages
- Identifies trend strength objectively
- Non-directional (works for both bulls and bears)
- Helps filter out ranging markets
- Effective trend strength confirmation
Limitations
- Doesn't indicate trend direction
- Lagging indicator
- Can remain high during trend corrections
- False signals during whipsaw periods
Combining with Other Indicators
Works well with:
- Moving Averages: Trend direction + strength confirmation
- MACD: Momentum confirmation with trend strength
- RSI: Avoid overbought/oversold in strong trends
- Bollinger Bands: Breakout confirmation
AI Agent Configuration
For MagiaTrade AI agents:
agent_config:
indicators:
- ADX:
period: 14
- Moving_Average:
period: 20
type: EMA
prompt: |
Only generate signals when ADX > 25 (trending market):
Buy when:
- ADX > 25 and rising
- +DI > -DI
- Price above 20 EMA
Avoid trading when ADX < 20 (ranging market)
Use wider stops in strong trends (ADX > 40)
Related Indicators
Further Reading
Parabolic SAR
Parabolic SAR provides stop and reverse points, following price like a trailing stop to identify potential reversal points.
Overview
The Parabolic SAR (Stop and Reverse) is designed to give exit points for long or short positions. It follows price trends and provides trailing stop levels that tighten as the trend progresses.
Configuration
indicator: Parabolic_SAR
acceleration: 0.02 # Starting acceleration factor
maximum: 0.2 # Maximum acceleration factor
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
acceleration | 0.02 | 0.01-0.05 | Starting acceleration factor |
maximum | 0.2 | 0.1-0.5 | Maximum acceleration factor |
Interpretation
SAR Position
- SAR below price: Uptrend (bullish signal)
- SAR above price: Downtrend (bearish signal)
- SAR flip: Potential trend reversal point
Trend Strength
- Wide SAR distance: Strong trend with room to continue
- Tight SAR distance: Trend may be ending
- Accelerating SAR: Trend is gaining momentum
Trading Signals
Basic Signals
- Buy: SAR flips from above to below price
- Sell: SAR flips from below to above price
- Hold long: Price stays above SAR
- Hold short: Price stays below SAR
Stop Loss Placement
- Use SAR level as dynamic trailing stop
- Exit position when SAR flips
- Allows profits to run while limiting losses
Best Practices
Parameter Adjustment
- Conservative: Lower acceleration (0.01) for fewer signals
- Aggressive: Higher acceleration (0.03-0.05) for faster signals
- Volatile markets: Lower maximum (0.15) to prevent over-acceleration
Market Conditions
- Works Best: Strong trending markets
- Avoid: Ranging or choppy markets
- Combine: With trend confirmation indicators
Example Strategies
SAR Trend Following
strategy: SAR_Trend_Follow
indicators:
- Parabolic_SAR:
acceleration: 0.02
maximum: 0.2
- ADX:
period: 14
rules:
- Buy when SAR flips below price and ADX > 25
- Sell when SAR flips above price
- Use SAR as trailing stop loss
SAR with Moving Average
strategy: SAR_MA_Combo
indicators:
- Parabolic_SAR:
acceleration: 0.02
maximum: 0.2
- Moving_Average:
period: 50
type: EMA
rules:
- Buy when SAR below price and price above 50 EMA
- Sell when SAR above price or price below 50 EMA
Advantages
- Provides objective exit points
- Acts as trailing stop loss
- Simple visual interpretation
- Adapts to trend acceleration
- Always in the market (buy or sell)
Limitations
- Poor performance in ranging markets
- Frequent whipsaws in sideways movement
- Late entry signals
- No consideration of volume or fundamentals
Combining with Other Indicators
Works well with:
- ADX: Confirm trend strength before trading SAR signals
- Moving Averages: Filter SAR signals for trend direction
- Volume: Confirm breakout validity
- RSI: Avoid extreme overbought/oversold conditions
AI Agent Configuration
For MagiaTrade AI agents:
agent_config:
indicators:
- Parabolic_SAR:
acceleration: 0.02
maximum: 0.2
- ADX:
period: 14
prompt: |
Generate signals only in trending markets (ADX > 25):
Buy when:
- SAR flips from above to below price
- ADX confirms trend strength
- Volume supports the move
Use SAR as trailing stop loss
Exit immediately when SAR flips
Related Indicators
Further Reading
ALMA (Arnaud Legoux Moving Average)
ARNAUD LEGOUX Moving Average is an adaptive moving average that reduces lag while maintaining smooth signals.
Overview
ALMA combines the best features of moving averages by using a Gaussian filter approach that provides smoother signals with less lag than traditional moving averages.
Configuration
indicator: ALMA
period: 14 # Calculation period
offset: 0.85 # Phase adjustment (0-1)
sigma: 6 # Smoothness factor
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 14 | 5-100 | Number of periods for calculation |
offset | 0.85 | 0-1 | Phase shift (0=SMA, 1=WMA) |
sigma | 6 | 4-8 | Smoothness factor |
Interpretation
Trend Direction
- Price above ALMA: Bullish trend
- Price below ALMA: Bearish trend
- ALMA slope up: Uptrend confirmed
- ALMA slope down: Downtrend confirmed
Signal Quality
- Smooth ALMA: Strong, stable trend
- Choppy ALMA: Weak or ranging market
- ALMA acceleration: Trend gaining momentum
Trading Signals
Basic Signals
- Buy: Price crosses above ALMA with upward slope
- Sell: Price crosses below ALMA with downward slope
- Hold: Price remains on same side of ALMA
- Caution: ALMA becomes flat (ranging market)
Advanced Applications
- Multiple timeframes: Use different ALMA periods
- Dynamic support/resistance: ALMA acts as key level
- Trend acceleration: Monitor ALMA slope changes
Best Practices
Parameter Optimization
- Trending markets: Use offset 0.85, sigma 6
- Volatile markets: Use offset 0.5, sigma 8
- Fast signals: Use offset 0.9, sigma 4
Market Conditions
- Works Best: All market conditions due to adaptive nature
- Excellent for: Reducing false signals vs traditional MAs
Example Strategies
ALMA Trend Following
strategy: ALMA_Trend_Follow
indicators:
- ALMA:
period: 21
offset: 0.85
sigma: 6
rules:
- Buy when price crosses above ALMA and ALMA slope > 0
- Sell when price crosses below ALMA and ALMA slope < 0
- Use ALMA as dynamic support/resistance
Multi-Timeframe ALMA
strategy: ALMA_Multi_Timeframe
indicators:
- ALMA:
period: 14
offset: 0.85
sigma: 6
alias: fast_alma
- ALMA:
period: 50
offset: 0.85
sigma: 6
alias: slow_alma
rules:
- Buy when fast_alma above slow_alma and price above both
- Sell when fast_alma below slow_alma and price below both
Advantages
- Reduced lag compared to traditional MAs
- Smooth signals with less noise
- Adaptive to different market conditions
- Customizable responsiveness
- Excellent trend identification
Limitations
- More complex than simple moving averages
- Parameter optimization required
- Still a lagging indicator
- May over-smooth in highly volatile markets
Combining with Other Indicators
Works well with:
- RSI: Momentum confirmation
- MACD: Trend and momentum alignment
- Volume: Confirm signal strength
- ADX: Trend strength validation
AI Agent Configuration
For MagiaTrade AI agents:
agent_config:
indicators:
- ALMA:
period: 21
offset: 0.85
sigma: 6
- RSI:
period: 14
prompt: |
Generate high-quality trend signals:
Buy when:
- Price crosses and closes above ALMA
- ALMA has positive slope
- RSI between 40-70 (not extreme)
Sell when:
- Price crosses and closes below ALMA
- ALMA has negative slope
Use ALMA as dynamic stop loss level
Related Indicators
Further Reading
Directional Movement
Directional Movement measures trend direction and strength using positive and negative directional indicators (+DI and -DI).
Overview
The Directional Movement system consists of two directional indicators that measure upward and downward price movement. It's the foundation for the ADX indicator.
Configuration
indicator: Directional_Movement
period: 14 # Calculation period
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 14 | 7-30 | Number of periods for smoothing |
Interpretation
Directional Indicators
- +DI above -DI: Bullish trend dominance
- -DI above +DI: Bearish trend dominance
- Wide spread: Strong directional movement
- Narrow spread: Weak directional movement
Crossover Signals
- +DI crosses above -DI: Bullish signal
- -DI crosses above +DI: Bearish signal
- Crossing at high levels: Stronger signal
- Crossing at low levels: Weaker signal
Trading Signals
Basic Signals
- Buy: +DI crosses above -DI
- Sell: -DI crosses above +DI
- Trend strength: Greater spread = stronger trend
- Trend weakness: Converging lines = weakening trend
Filter Signals
- Only trade when spread is significant (>10 points)
- Use with ADX to confirm trend strength
- Wait for sustained crossover (not just momentary)
Best Practices
Signal Quality
- High-quality signals: DI crossover with expanding spread
- Low-quality signals: DI crossover with converging lines
- False signals: Multiple quick crossovers
Market Conditions
- Works Best: Trending markets with clear direction
- Avoid: Ranging markets with frequent crossovers
Example Strategies
DI Crossover System
strategy: DI_Crossover
indicators:
- Directional_Movement:
period: 14
- ADX:
period: 14
rules:
- Buy when +DI crosses above -DI and ADX > 25
- Sell when -DI crosses above +DI and ADX > 25
- Exit when ADX falls below 20
DI Trend Strength
strategy: DI_Trend_Strength
indicators:
- Directional_Movement:
period: 14
rules:
- Enter long when +DI > -DI by at least 10 points
- Enter short when -DI > +DI by at least 10 points
- Exit when spread narrows to less than 5 points
Advantages
- Clear directional bias indication
- Works well with ADX system
- Quantifies trend strength
- Objective crossover signals
Limitations
- Generates false signals in ranging markets
- Lagging indicator
- Needs confirmation from other indicators
- Whipsaws during trend transitions
Combining with Other Indicators
Works well with:
- ADX: Essential for trend strength confirmation
- Moving Averages: Trend direction validation
- Volume: Confirm breakout strength
- RSI: Avoid extreme overbought/oversold trades
AI Agent Configuration
For MagiaTrade AI agents:
agent_config:
indicators:
- Directional_Movement:
period: 14
- ADX:
period: 14
prompt: |
Generate directional signals with trend strength confirmation:
Buy when:
- +DI crosses above -DI
- ADX > 25 (trending market)
- Spread between +DI and -DI is widening
Sell when:
- -DI crosses above +DI
- ADX > 25 (trending market)
- Spread between -DI and +DI is widening
Exit when ADX falls below 20 or spread narrows significantly
Related Indicators
Further Reading
DEMA (Double EMA)
Double EMA is a double smoothed exponential moving average designed to reduce lag compared to traditional EMAs.
Overview
DEMA applies exponential smoothing twice to reduce the lag inherent in moving averages while maintaining smooth trend identification.
Configuration
indicator: DEMA
period: 21 # EMA calculation period
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 21 | 5-200 | EMA period for double smoothing |
Interpretation
Trend Direction
- Price above DEMA: Bullish trend
- Price below DEMA: Bearish trend
- DEMA slope up: Uptrend momentum
- DEMA slope down: Downtrend momentum
Signal Quality
- Faster response: Less lag than standard EMA
- Smooth signals: Reduces false breakouts
- Clear trend changes: Earlier trend reversal detection
Trading Signals
Basic Signals
- Buy: Price crosses above DEMA
- Sell: Price crosses below DEMA
- Trend continuation: Price remains above/below DEMA
- Reversal warning: DEMA slope changes
Advanced Applications
- Dynamic support/resistance: DEMA as key price level
- Multiple timeframes: Different DEMA periods
- Pullback entries: Price returns to DEMA in trend
Best Practices
Period Selection
- Short-term: 10-15 periods for active trading
- Medium-term: 21-30 periods for swing trading
- Long-term: 50+ periods for position trading
Market Conditions
- Works Best: Trending markets
- Caution: Ranging markets may cause whipsaws
Example Strategies
DEMA Trend Following
strategy: DEMA_Trend_Follow
indicators:
- DEMA:
period: 21
- Volume:
ma_period: 20
rules:
- Buy when price crosses above DEMA with volume confirmation
- Sell when price crosses below DEMA
- Use DEMA as trailing stop loss
DEMA Pullback Entry
strategy: DEMA_Pullback
indicators:
- DEMA:
period: 21
- RSI:
period: 14
rules:
- Identify uptrend (price above DEMA)
- Buy when price pulls back to DEMA and RSI < 50
- Sell when trend breaks (price closes below DEMA)
Advantages
- Reduced lag compared to standard EMA
- Smooth trend identification
- Earlier reversal signals
- Less noise than simple moving averages
Limitations
- More false signals than slower MAs
- Still lagging indicator
- Can be whipsawed in ranging markets
- Requires trend confirmation
Combining with Other Indicators
Works well with:
- RSI: Momentum confirmation
- Volume: Validate signal strength
- MACD: Trend and momentum alignment
- ADX: Trend strength confirmation
AI Agent Configuration
For MagiaTrade AI agents:
agent_config:
indicators:
- DEMA:
period: 21
- RSI:
period: 14
- Volume:
ma_period: 20
prompt: |
Generate fast trend signals with confirmation:
Buy when:
- Price crosses and closes above DEMA
- RSI shows momentum (>50)
- Volume above average
Sell when:
- Price crosses and closes below DEMA
- Or RSI shows weakness (<40)
Use DEMA as dynamic stop loss
Related Indicators
Further Reading
TEMA (Triple EMA)
Triple EMA applies exponential smoothing three times to achieve minimal lag while maintaining smooth signals.
Overview
TEMA is designed to be more responsive than both simple EMA and DEMA by applying triple exponential smoothing, making it ideal for fast-moving markets and scalping strategies.
Configuration
indicator: TEMA
period: 21 # Base EMA period
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 21 | 5-100 | Base EMA period for triple smoothing |
Interpretation
Trend Direction
- Price above TEMA: Strong bullish trend
- Price below TEMA: Strong bearish trend
- TEMA slope: Indicates trend momentum
- TEMA color change: Quick trend reversal signal
Signal Characteristics
- Ultra-responsive: Fastest of the EMA family
- Minimal lag: Quick adaptation to price changes
- Smooth signals: Reduced noise compared to price
Trading Signals
Basic Signals
- Buy: Price crosses above TEMA with upward slope
- Sell: Price crosses below TEMA with downward slope
- Quick reversal: TEMA slope changes direction
- Strong trend: Price stays far from TEMA
Scalping Applications
- Fast entries: Quick response to price changes
- Tight stops: Use TEMA as close stop loss
- Momentum trades: Follow TEMA slope changes
Best Practices
Optimal Usage
- Scalping: 5-15 minute timeframes
- Day trading: 15-60 minute timeframes
- Trend changes: Monitor slope reversals
- Risk management: Quick stop loss adjustments
Market Conditions
- Excellent for: Fast-moving trending markets
- Caution in: Ranging or low-volume markets
Example Strategies
TEMA Scalping
strategy: TEMA_Scalping
indicators:
- TEMA:
period: 14
- Volume:
ma_period: 10
rules:
- Buy when price crosses above TEMA with volume spike
- Sell when price crosses below TEMA
- Target: 1-2% profit, Stop: at TEMA level
TEMA Momentum
strategy: TEMA_Momentum
indicators:
- TEMA:
period: 21
- RSI:
period: 7
rules:
- Buy when TEMA slope turns up and RSI > 50
- Sell when TEMA slope turns down and RSI < 50
- Hold while TEMA maintains slope direction
Advantages
- Minimal lag among moving averages
- Quick response to trend changes
- Smooth signal generation
- Excellent for short-term trading
- Clear visual trend indication
Limitations
- Very sensitive to price noise
- Many false signals in ranging markets
- Requires quick decision making
- Best for experienced traders
Combining with Other Indicators
Works well with:
- Volume: Confirm signal strength
- RSI: Quick momentum confirmation
- MACD: Validate trend changes
- Support/Resistance: Entry/exit timing
AI Agent Configuration
For MagiaTrade AI agents:
agent_config:
indicators:
- TEMA:
period: 21
- Volume:
ma_period: 10
- RSI:
period: 7
prompt: |
Generate quick trend signals for active trading:
Buy when:
- Price crosses above TEMA
- TEMA slope is positive
- Volume above 10-period average
- RSI shows momentum (>50)
Sell when:
- Price crosses below TEMA
- Or TEMA slope turns negative
Use tight stops at TEMA level
Quick profit taking (1-2%)
Related Indicators
Further Reading
Hull Moving Average (HMA)
Hull Moving Average emphasizes recent prices while eliminating lag, providing smooth yet responsive trend signals.
Overview
Developed by Alan Hull, the HMA uses a unique calculation method that combines weighted moving averages to achieve both smoothness and responsiveness.
Configuration
indicator: HMA
period: 20 # Calculation period
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 20 | 5-200 | Number of periods for calculation |
Interpretation
Trend Signals
- Price above HMA: Strong bullish trend
- Price below HMA: Strong bearish trend
- HMA color change: Trend reversal signal
- HMA slope: Trend momentum direction
Signal Quality
- Smooth signals: Reduces noise effectively
- Minimal lag: Responds quickly to trend changes
- Clear reversals: Color changes indicate trend shifts
Trading Signals
Basic Signals
- Buy: Price crosses above HMA (green)
- Sell: Price crosses below HMA (red)
- Trend continuation: Stay with HMA direction
- Reversal: HMA color change confirmation
Advanced Applications
- Multiple timeframes: Use different HMA periods
- Pullback entries: Buy/sell at HMA touch points
- Trend strength: Distance from HMA indicates strength
Best Practices
Period Selection
- Short-term trading: 14-21 periods
- Swing trading: 21-50 periods
- Long-term analysis: 50+ periods
Market Application
- Works Best: All market conditions due to adaptive nature
- Excellent for: Trend following with minimal whipsaws
Example Strategies
HMA Trend Following
strategy: HMA_Trend_Follow
indicators:
- HMA:
period: 20
- Volume:
ma_period: 20
rules:
- Buy when HMA turns green (bullish) with volume confirmation
- Sell when HMA turns red (bearish)
- Hold positions while HMA maintains color
HMA Pullback Strategy
strategy: HMA_Pullback
indicators:
- HMA:
period: 20
- RSI:
period: 14
rules:
- Identify HMA trend (green = bullish, red = bearish)
- Buy pullbacks to green HMA when RSI < 50
- Sell pullbacks to red HMA when RSI > 50
Advantages
- Excellent balance of smoothness and responsiveness
- Clear visual trend signals
- Minimal false signals
- Works in all market conditions
- Easy to interpret
Limitations
- Still a lagging indicator
- May be late on very fast trend changes
- Requires trend confirmation in ranging markets
- Less effective in extremely volatile conditions
Combining with Other Indicators
Works well with:
- RSI: Momentum and entry timing
- Volume: Confirm signal strength
- MACD: Additional trend confirmation
- Support/Resistance: Key level confluence
AI Agent Configuration
For MagiaTrade AI agents:
agent_config:
indicators:
- HMA:
period: 20
- RSI:
period: 14
- Volume:
ma_period: 20
prompt: |
Generate high-quality trend signals using HMA:
Buy when:
- HMA turns green (bullish trend)
- Price is above HMA
- Volume above 20-period average
- RSI between 30-70 (not extreme)
Sell when:
- HMA turns red (bearish trend)
- Or price closes below green HMA
Use HMA as dynamic support/resistance
Related Indicators
Further Reading
LSMA (Least Squares Moving Average)
Least Squares Moving Average is based on linear regression calculations, providing smooth trend identification with statistical foundation.
Overview
LSMA uses linear regression to calculate the moving average, which helps identify the underlying trend while filtering out noise through statistical methods.
Configuration
indicator: LSMA
period: 25 # Calculation period
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 25 | 10-200 | Number of periods for regression |
Interpretation
Trend Analysis
- Price above LSMA: Bullish trend
- Price below LSMA: Bearish trend
- LSMA slope: Trend direction and strength
- LSMA as support/resistance: Dynamic levels
Trading Signals
Basic Signals
- Buy: Price crosses above LSMA
- Sell: Price crosses below LSMA
- Trend continuation: Price respects LSMA as support/resistance
Best Practices
Example Strategies
LSMA Trend Following
strategy: LSMA_Trend
indicators:
- LSMA:
period: 25
rules:
- Buy when price crosses above LSMA
- Sell when price crosses below LSMA
Related Indicators
McGinley Dynamic
Adaptive moving average that automatically adjusts to market volatility and conditions.
Overview
McGinley Dynamic adjusts its smoothing constant based on market conditions, making it more responsive in trending markets and smoother in ranging markets.
Configuration
indicator: McGinley_Dynamic
period: 14 # Base period
constant: 0.6 # Smoothing constant
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 14 | 5-100 | Base calculation period |
constant | 0.6 | 0.1-1.0 | Smoothing constant |
Interpretation
- Price above McGinley: Bullish trend
- Price below McGinley: Bearish trend
- Adaptive response: Adjusts to market volatility automatically
Trading Signals
- Buy: Price crosses above McGinley Dynamic
- Sell: Price crosses below McGinley Dynamic
Best Practices
Example Strategy
strategy: McGinley_Adaptive
indicators:
- McGinley_Dynamic:
period: 14
constant: 0.6
rules:
- Buy when price crosses above McGinley Dynamic
- Sell when price crosses below McGinley Dynamic
Related Indicators
AMA (Adaptive Moving Average)
Kaufman's Adaptive Moving Average adjusts its speed based on market volatility and efficiency.
Overview
AMA uses an Efficiency Ratio to determine how much weight to give to recent prices, making it fast in trending markets and slow in ranging markets.
Configuration
indicator: AMA
period: 14 # Efficiency ratio period
fast_sc: 2 # Fast smoothing constant
slow_sc: 30 # Slow smoothing constant
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 14 | 5-50 | Efficiency ratio period |
fast_sc | 2 | 1-10 | Fast smoothing constant |
slow_sc | 30 | 10-100 | Slow smoothing constant |
Interpretation
- Price above AMA: Bullish trend
- Price below AMA: Bearish trend
- Adapts speed: Fast in trends, slow in ranges
Trading Signals
- Buy: Price crosses above AMA in trending market
- Sell: Price crosses below AMA in trending market
Example Strategy
strategy: AMA_Adaptive
indicators:
- AMA:
period: 14
fast_sc: 2
slow_sc: 30
rules:
- Buy when price crosses above AMA
- Sell when price crosses below AMA
Related Indicators
EMA (Exponential Moving Average)
Exponential Moving Average gives more weight to recent prices, making it more responsive than simple moving averages.
Configuration
indicator: EMA
period: 20 # Calculation period
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 20 | 5-200 | Number of periods |
Interpretation
- Price above EMA: Bullish trend
- Price below EMA: Bearish trend
- Faster response: More sensitive than SMA
Trading Signals
- Buy: Price crosses above EMA
- Sell: Price crosses below EMA
Example Strategy
strategy: EMA_Trend
indicators:
- EMA:
period: 20
rules:
- Buy when price crosses above EMA
- Sell when price crosses below EMA
Related Indicators
WMA (Weighted Moving Average)
Weighted Moving Average assigns linearly increasing weights to more recent data points.
Configuration
indicator: WMA
period: 20 # Calculation period
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 20 | 5-200 | Number of periods |
Interpretation
- Price above WMA: Bullish trend
- Price below WMA: Bearish trend
- More responsive: Than SMA, less than EMA
Trading Signals
- Buy: Price crosses above WMA
- Sell: Price crosses below WMA
Related Indicators
SMMA (Smoothed Moving Average)
Smoothed Moving Average reduces noise and provides very smooth trend signals.
Configuration
indicator: SMMA
period: 20 # Calculation period
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 20 | 5-200 | Number of periods |
Interpretation
- Price above SMMA: Bullish trend
- Price below SMMA: Bearish trend
- Very smooth: Reduces whipsaws significantly
Trading Signals
- Buy: Price crosses above SMMA
- Sell: Price crosses below SMMA
Related Indicators
VWMA (Volume Weighted Moving Average)
Volume Weighted Moving Average weights price data by trading volume for more accurate trend representation.
Configuration
indicator: VWMA
period: 20 # Calculation period
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 20 | 5-200 | Number of periods |
Interpretation
- Price above VWMA: Bullish with volume support
- Price below VWMA: Bearish with volume support
- Volume-weighted: More accurate than price-only averages
Trading Signals
- Buy: Price crosses above VWMA with volume
- Sell: Price crosses below VWMA with volume
Related Indicators
VWAP (Volume Weighted Average Price)
Volume Weighted Average Price is the average price weighted by volume, commonly used as an institutional benchmark.
Configuration
indicator: VWAP
session_reset: true # Reset on new session
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
session_reset | true | true/false | Reset calculation each session |
Interpretation
- Price above VWAP: Bullish sentiment
- Price below VWAP: Bearish sentiment
- Institutional level: Key reference price
Trading Signals
- Buy: Price reclaims VWAP with volume
- Sell: Price loses VWAP with volume
Related Indicators
Linear Regression Curve
Creates a trend line based on linear regression analysis of price data.
Configuration
indicator: Linear_Regression
period: 14 # Calculation period
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 14 | 5-100 | Number of periods |
Interpretation
- Price above line: Bullish deviation
- Price below line: Bearish deviation
- Slope: Shows trend direction
Trading Signals
- Buy: Price returns to line from below
- Sell: Price returns to line from above
Related Indicators
Linear Regression Slope
Measures the slope of the linear regression line to determine trend direction and strength.
Configuration
indicator: Linear_Regression_Slope
period: 14 # Calculation period
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 14 | 5-100 | Number of periods |
Interpretation
- Positive slope: Uptrend
- Negative slope: Downtrend
- Steeper slope: Stronger trend
Trading Signals
- Buy: Slope turns positive
- Sell: Slope turns negative
Related Indicators
Super Trend
Trend-following indicator that uses Average True Range to create dynamic support and resistance levels.
Configuration
indicator: Super_Trend
period: 10 # ATR period
multiplier: 3.0 # ATR multiplier
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
period | 10 | 5-20 | ATR calculation period |
multiplier | 3.0 | 1.0-5.0 | ATR multiplier |
Interpretation
- Price above Super Trend: Bullish (green)
- Price below Super Trend: Bearish (red)
- Color change: Trend reversal signal
Trading Signals
- Buy: Super Trend turns green
- Sell: Super Trend turns red
Related Indicators
Ichimoku Cloud
Comprehensive indicator system that provides trend, momentum, and support/resistance analysis in one tool.
Configuration
indicator: Ichimoku
conversion_period: 9 # Tenkan-sen
base_period: 26 # Kijun-sen
span_b_period: 52 # Senkou Span B
displacement: 26 # Cloud displacement
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
conversion_period | 9 | 5-20 | Tenkan-sen period |
base_period | 26 | 20-50 | Kijun-sen period |
span_b_period | 52 | 40-100 | Senkou Span B period |
displacement | 26 | 20-50 | Cloud forward displacement |
Interpretation
- Price above cloud: Strong bullish
- Price in cloud: Neutral/consolidation
- Price below cloud: Strong bearish
Trading Signals
- Buy: Price breaks above cloud
- Sell: Price breaks below cloud
Related Indicators
Zig Zag
Identifies significant price swings by connecting major highs and lows while filtering out minor price movements.
Configuration
indicator: Zig_Zag
deviation: 5 # Minimum percentage change
depth: 12 # Minimum bars between swings
Parameters
Parameter | Default | Range | Description |
---|---|---|---|
deviation | 5 | 1-20 | Minimum percentage change |
depth | 12 | 5-50 | Minimum bars between swings |
Interpretation
- Connects highs and lows: Shows major price swings
- Filters noise: Ignores minor movements
- Trend structure: Reveals overall pattern
Trading Signals
- Pattern recognition: Identify swing structures
- Support/resistance: Key swing levels