Half Trend Signal MT4
- 지표
-
Cao Minh Quang
Welcome to my profile. I am a developer MQL4 and MQL5.
Telegram: https://t.me/storevan
Thanks and regards! - 버전: 1.0
- 활성화: 5
Half Trend Signal filters out minor market noise to deliver definitive, non-repainting long and short entry signals based on asset volatility and structural swing pivots.
Instead of displaying standard lag-heavy moving averages, this system uses an adaptive directional engine to lock onto clean trend lines and overlay automatic risk-management matrices directly onto your chart.
How It Works
- Trading Long Breakouts: When the system transitions from a bearish regime into a bullish regime, a Green Arrow will print beneath the breakout candle. Execute your position at the entry line, setting your dynamic stop-loss boundary inside the red risk gradient.
- Trading Short Breakdowns: Monitor the system for a shift into a bearish regime, indicated by a Red Arrow appearing above the asset price. Execute short orders relative to the entry line and utilize the upper red gradient zone to map your protective risk ceiling.
- Managing Exits and Targets: Take partial profits sequentially as the asset price moves through the Green target lines (TP1, TP2, and TP3). If a sudden trend reversal prints an opposing signal before your final targets are satisfied, the script automatically triggers a reversal exit rule to preserve accumulated gains.
Key Features
Swing Pivot Trackers
The engine scans local high and low data using an adjustable lookback filter (Amplitude) to find actual structural swing points rather than temporary price spikes.
Volatility-Adjusted Bands
It establishes dynamic outer channel boundaries using a 100-period Average True Range calculation divided by two (ATR/2). The total channel width automatically scales using your custom risk buffer parameter (Channel Deviation).
Target Projection
On trend confirmation, plots entry, stop-loss (ATR-based), and three take-profit levels.
Dynamic Updates
All levels (entry, SL, TP1–TP3) auto-adjust based on volatility and are labeled in real time on the chart.
User Inputs:
- Max Bars: Limit the number of candles used for calculation.
- Pivot Length: Adjustable lookback filter to find actual structural swing point
- ATR Length: Set the parameters to calculate the Average True Range.
- Channel Deviation: Multiplier for the Average True Range (ATR) to establish the upper and lower channel bands. Use multiplication with Atr/2.
- Base Risk: Sets SL distance from Entry line, and TP1 distance from entry. TP2 is 2x, TP3 is 3x
- Styles: Configure the visibility and color of chart objects.
- Alert/Notification: Allows send alert or notification to mobile
- Integration EA: Provide EA parameters as global variables
Prefix_ENTRY_PRICE: (double) Entry price
Prefix_ENTRY_TIME: (double) Entry time
Prefix_TRADE_DIRECTION: (1) = BUY; (-1) = SELL
Prefix_SL_PRICE: (double) Stoploss price
Prefix_TP1_PRICE: (double) Takeprofit 1 price
Prefix_TP2_PRICE: (double) Takeprofit 2 price
Prefix_TP3_PRICE: (double) Takeprofit 3 price
Whether you're a beginner looking for clearer entries or an experienced trader wanting visual SL/TP targets with minimal noise, Half Trend Signal can become your go-to trading companion.

