Trend Pulse Detector
- 지표
-
Jorge Eliecer Valencia Ferreira
🤖 Quantitative Developer & Algorithmic Trading Specialist | MQL5 & Python
Welcome to my official MQL5 profile. I am a Quantitative Developer and Algorithmic Trader focused on creating high-quality, institutionally robust Expert Advisors with strict risk management. - 버전: 1.10
**What it does**
Trend Pulse Lite draws a 50 EMA on the chart and paints it according to the market state:
- Green: uptrend.
- Red: downtrend.
- Gray: range, or a trend too weak to be taken seriously.
A moving average alone always has a slope, even if the price has been moving sideways for hours. That is why here the trend requires two conditions: an ADX above the minimum and a moving average slope large enough relative to the ATR. Because the slope is divided by the ATR, the same threshold works on gold, forex, or indices without needing to be readjusted for the volatility of each.
In the corner of the chart, a label shows the current state (UP, DOWN, or RANGE) and the ADX value.
**Buy and sell arrows**
When the line turns green after a downtrend, a buy arrow appears. When it turns red after an uptrend, a sell arrow appears. Gray segments do not generate arrows: if the uptrend pauses in a range and then continues upwards, the buy signal is not repeated. This way, there is one arrow per actual change of direction, rather than one every time the ADX fluctuates near the threshold.
**No repainting**
The line and the arrows are calculated only with closed candles. The forming candle remains blank, so a color or an arrow that has already appeared will not change later.
**Alert**
Optional pop-up alert when a new arrow appears. It is disabled by default and is sent only once per candle.
**Parameters**
- `Baseline EMA period` (50): moving average to be colored.
- `Slope lookback (bars)` (3): candles used to measure the slope.
- `ATR period` (14).
- `Min |slope|/ATR to call a trend` (0.10): increase it to see more gray and less trend.
- `ADX period` (14) and `Min ADX to call a trend` (22).
- `Show buy/sell arrows on trend flip` (true).
- `Pop-up alert on new arrow` (false).
- `Show status label` (true).
- `Bars to process` (5000).
**What it does not do**
- It does not open trades or draw stop loss or take profit lines.
- It does not look at other timeframes: it works only with the chart's timeframe. A trend change on M15 may go against H4.
- It does not predict the price. It tells you if there is a trend right now, and in which direction.
**Full version**
Trend Pulse Pro adds a panel with the regime of 4 configurable timeframes, entry arrows that only appear when the chart and higher timeframes match in direction, and stop loss and take profit lines calculated with ATR for each arrow.
