5min MACD scalp (3commas)
Nov 18, 2021

The 5min MACD scalp indicator is a specialized trend-following tool designed to identify high-probability scalping opportunities on the 5-minute timeframe using a combination of EMA crossovers and MACD histogram analysis. It aims to filter out noise by requiring momentum peaks to occur in alignment with a broader trend established by moving averages.
Usage
The indicator can be used to identify both long and short trade entries based on a combination of trend and momentum filters. A trade setup typically requires the following:
- Trend Confirmation: The system looks for a fast EMA (e.g., 50-period) crossing a slow EMA (e.g., 200-period). Trades are generally executed within a specific window of bars following this crossover to ensure the trend is fresh.
- Momentum Peaks: For long trades, the script identifies significant negative peaks in the MACD histogram, suggesting an oversold pullback within an uptrend. Conversely, for shorts, it looks for significant positive peaks in the histogram.
- Pullback Filtering: The "Pullback Filter" setting can be enabled to ensure the entry occurs after a specific number of counter-trend candles, aiming for a better risk-to-reward entry point.
- RSI Filter: An optional RSI filter can be toggled to ensure the Relative Strength Index is within a specific range and moving in the desired direction (rising for longs, falling for shorts).
Details
The script executes by monitoring the relationship between the 50/200 EMAs and the MACD histogram. It attempts to automate a "peak detection" logic by comparing the current histogram bar against a lookback period to ensure it is a significant local extreme. Furthermore, users can enable a statistical filter that compares the current histogram value to its historical average, requiring the current peak to be a specific percentage (e.g., 150%) of the average to be considered valid.
Settings
Strategy
- Long/Short: Toggles for enabling or disabling specific trade directions.
- TP/SL (%): Sets the target profit and stop loss percentages for the automated backtester.
- Start/End Date: Filters the historical data range for backtesting.
EMAs Trend
- Trend Type: Choose between EMA crosses or price location relative to an EMA.
- Valid Cross: Limits how many bars after a crossover an entry remains valid.
MACD & Histogram
- MACD Resolution: Allows the MACD to be calculated on a different timeframe (e.g., 1-minute).
- Lookback Period: The number of bars used to determine if the current histogram value is a significant "peak."
- Compare with Average: When enabled, requires the histogram peak to exceed a multiple of the moving average of the histogram.
Filters
- RSI Filter: Sets the boundaries and direction requirements for the RSI.
- Pullback Filter: Requires a minimum number of opposite-colored candles before an entry is triggered.
FAQ
How do I use the 5min MACD scalp?
Apply the indicator to a 5-minute chart. Look for the EMA crossover to establish the trend, then wait for the MACD histogram to produce a significant peak in the opposite direction before the strategy triggers an entry signal.
What is the "Compare with Histogram Average" setting?
This setting acts as a volatility filter. It prevents the strategy from taking trades on small, insignificant histogram fluctuations by requiring the current momentum peak to be substantially larger than the average histogram size over a set period.
How can I access 5min MACD scalp?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.