Guide
How does the macd+stoch strategy work ?
The "macd+stoch" strategy combines trend and momentum analysis over multiple timeframes to execute trades. It operates on a 5-minute timeframe by leveraging the MACD for trend detection and Stochastic Oscillator for buy/sell signals.
- MACD Component: Utilizes a fast length of 144 and a slow length of 312 to identify the prevailing trend direction. Different smoothing techniques ("SMA" or "EMA") are applicable based on trader preference. When all MACD changes are consistently in one direction, this signals either a bullish or bearish trend confirmation.
- Stochastic Oscillator: Employs multiple %K lengths (14, 42, 126, 378) to smooth the stochastic indicators and aggregate them to form a composite momentum measure (allp). Decision points for trade entries are based on allp crossings and historical highs or lows.
- Trade Execution: Long positions initiate when MACD histogram and MACD changes are positive, stochastic d is below 20, and volume increases. Short positions are entered under opposite conditions. Positions are closed based on stochastic thresholds (above 80 for long exits and below 20 for short exits) or if stop loss/profit targets are reached.