Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.
What Is This Strategy?
The Trend Trigger Factor Breakout is a trend-following breakout strategy built around the Trend Trigger Factor (TTF), an indicator devised by M. H. Pee. Unlike classic oscillators that squeeze price into overbought and oversold bands, the TTF measures directional displacement — how far the market has stretched its highs and lows over a recent window compared with the window immediately before it. That difference is what a young trend looks like before it becomes obvious on the chart, which is why this approach is designed to catch trends as they emerge rather than after they have already run.
At its core, the strategy compares two adjacent look-back windows of equal length. It asks a simple question: has the market pushed its highs meaningfully further up (a sign of buying pressure) or dropped its lows meaningfully further down (a sign of selling pressure)? The TTF converts that comparison into a single bounded number that swings roughly between −200 and +200. When the reading crosses decisively above a positive trigger level, the strategy interprets it as a bullish regime change; when it crosses below the negative trigger, it reads a bearish regime change.
This strategy is best understood as a learning tool for traders who want to study breakout and momentum concepts on the MetaTrader 5 (MT5) platform. It suits students of technical analysis who are curious about how range-expansion logic differs from conventional oscillators, and who want to see how volatility-based risk sizing — using the Average True Range (ATR) — can be attached to a signal. It is a strategy analysis exercise, not a shortcut, and it rewards patient study rather than rapid deployment on a live account.
How It Works
The strategy evaluates one fully-closed bar at a time on the primary chart timeframe. On each newly-closed bar it recalculates the TTF and checks for a "cross" through the trigger level. Here is the logic in plain English:
- Building the TTF: For a chosen look-back length, the strategy finds the highest high and lowest low of the current window, and the highest high and lowest low of the prior window sitting directly behind it. It then computes two values — BuyPower (current highest high minus prior lowest low) and SellPower (prior highest high minus current lowest low). The TTF is
100 × (BuyPower − SellPower) / (0.5 × (BuyPower + SellPower)). - Long entry signal: The strategy signals a long when the TTF crosses up through the positive trigger level (for example, from below +100 to above +100). This indicates the market has expanded its highs decisively relative to where it recently traded — the signature of an emerging uptrend.
- Short entry signal: The strategy signals a short when the TTF crosses down through the negative trigger level (for example, from above −100 to below −100), indicating the lows have stretched decisively lower.
- Regime flip: A cross into the opposite regime flips the book. If a bullish cross occurs while a short position is open, the strategy closes the short before considering a new long — and vice versa. It avoids stacking a second position in the same direction.
- Stop-loss logic: Risk is volatility-scaled. The stop distance is set to
AtrStopMult × ATRaway from the entry price. On a long, the stop sits below entry; on a short, it sits above. Because it is tied to the ATR, the stop automatically widens in volatile conditions and tightens in calmer ones. - Take-profit logic: The target is placed at a reward-to-risk multiple of that stop distance. If the risk (entry to stop) is one unit, the take-profit is set
RewardRiskunits away in the direction of the trade. With the default reward-to-risk of 1.8, the target sits 1.8 times further from entry than the stop.
Because every calculation is read from the primary timeframe only, the behaviour is straightforward to follow bar by bar, which makes it a clean example for studying how a single indicator can drive entries, exits, and position management together.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| TtfPeriod | 15 | 5 | 40 | Look-back length of each of the two adjacent high/low windows the TTF compares. Shorter values react faster; longer values smooth the signal. |
| TriggerLevel | 100 | 20 | 150 | The absolute TTF level a fresh cross must clear (±TriggerLevel) to arm a signal. Higher values demand a stronger displacement before acting. |
| AtrPeriod | 14 | 5 | 30 | The Average True Range length used to measure recent volatility for risk sizing. |
| AtrStopMult | 2.0 | 0.5 | 5.0 | Stop distance as a multiple of ATR from entry. Larger values place a wider, more forgiving stop. |
| RewardRisk | 1.8 | 1.0 | 4.0 | Take-profit distance expressed as a multiple of the entry-to-stop risk. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed position size in lots for each trade. |

Recommended Chart Settings
The Trend Trigger Factor Breakout reads everything from a single primary timeframe, which makes it flexible across charts, but it was designed with liquid major forex pairs (such as EUR/USD or GBP/USD) on an intraday-to-swing timeframe like the H1 (1-hour) or H4 (4-hour) chart in mind. These timeframes give the two adjacent look-back windows enough room to reflect a genuine shift in range expansion rather than short-lived noise.
As always, these are starting points for study, not fixed rules. Results will vary considerably across different symbols, timeframes, spreads, and market conditions. It is worth testing several combinations in the MT5 Strategy Tester and on a demo account to understand how the TTF and the trigger level behave on the specific instrument you are studying.
How to Install on MetaTrader 5
- Download the
.ex5file from the link below. - Copy it to your MT5
MQL5\Expertsfolder. - Restart MetaTrader 5 or refresh the Navigator panel.
- Drag the EA onto a chart matching the recommended symbol and timeframe.
- Configure the input parameters and enable Algo Trading.
What to Consider Before Using This EA
Every strategy has a personality shaped by its underlying logic, and it helps to understand both sides before committing time to it.
Strengths of this approach:
- Trend-emergence focus. By comparing two adjacent range windows, the TTF is built to detect displacement early, which can help identify a directional move while it is still developing rather than after the fact.
- Clear, rules-based signals. Entries depend on an unambiguous cross of a numeric level, which removes discretionary guesswork and makes the logic easy to backtest and study.
- Volatility-aware risk. Because stops and targets scale with the ATR, the strategy adapts its risk footprint to current market conditions instead of using a fixed pip distance.
Known limitations:
- Range-bound whipsaws. Like most breakout systems, the TTF can generate false signals when the market is chopping sideways. Repeated crosses of the trigger level in a directionless market may lead to a series of losing trades. Historically, breakout logic underperforms in low-volatility, mean-reverting conditions.
- Lag versus noise trade-off. A shorter look-back reacts quickly but produces more false crosses; a longer one is steadier but slower. There is no single setting that is optimal for all conditions.
- No trend filter. The strategy acts on the raw cross without a separate higher-timeframe trend confirmation, so it may enter counter to the dominant longer-term direction.
- Fixed position size. The lot size does not scale with account equity, so risk as a percentage of capital changes as the balance moves.
None of these points make the strategy unusable — they simply describe the conditions where it may struggle. Understanding them is part of using any tool responsibly.
Risk Management Tips
Sound risk management matters far more than any single indicator setting. As you study this strategy, keep these general principles in mind:
- Risk a small fraction per trade. A widely used guideline is to risk no more than 1–2% of account equity on any single position. Because this EA uses a fixed lot size, you may need to adjust the
Lotsinput so the ATR-based stop distance stays within that limit for your account size. - Start on a demo account. Always run a new strategy on a demo account first to observe how it behaves across different sessions and market conditions before considering any real capital.
- Understand drawdown. Even a well-built trend system will experience losing streaks. Study the maximum drawdown in testing so you know what a normal rough patch looks like and can avoid abandoning a plan at the worst moment.
- Account for costs. Spreads, commissions, and slippage all affect real results, especially on shorter timeframes. Factor them into any evaluation.
- Diversify your study. Avoid concentrating everything on one symbol or one parameter set. Comparing behaviour across instruments deepens your understanding of when the logic works and when it does not.
Treat this EA as a structured way to learn how range-expansion breakout logic and volatility-scaled risk fit together, not as a substitute for developing your own judgment.
Risk Warning
Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.
Downloads
- Expert Advisor: TrendTriggerFactorBreakout.ex5 (29 downloads)
- Source Code: TrendTriggerFactorBreakout.mq5 (32 downloads)
- Documentation: TrendTriggerFactorBreakout.pdf (32 downloads)