1. Strategy Overview

This is a popular strategy originating from YouTube. Though the original creator has removed the source video, technical details can still be obtained through other reviewers’ content 86% win rate secret strategy | RSI + secret indicator. This strategy mainly uses the HalfTrend indicator for trend identification, paired with short‑period RSI(2) to catch extreme overbought and oversold conditions. In this article, I will break down the complete logic of this strategy and present an open‑source MT5 Expert Advisor (EA) ready for backtest.

2. Full Trading Rules

Core Indicators

  • HalfTrend: Amplitude set to 4, Channel Deviation set to 2. It identifies the primary market trend and distinguishes between uptrend and downtrend.
  • RSI: Period set to 2, with oversold and overbought thresholds at 10 and 90. Used to capture short‑term overbought and oversold market conditions.

Basic Rules

  • Timeframe: All timeframes
  • Assets: Precious metals, forex, energy, and others

Entry Rules

Long entry

  1. HalfTrend shows an uptrend
  2. RSI(2) enters oversold zone (<10)
  3. After RSI hits the oversold zone, wait for one bar close above the high of the previous bar

Long Setup Example

Short entry

  1. HalfTrend shows a downtrend
  2. RSI(2) enters overbought zone (>90)
  3. After RSI hits the overbought zone, wait for one bar close below the low of the previous bar

Short Setup Example

Exit Rules

Long Exit

  • SL: Swing low
  • TP: Fixed take‑profit, or exit when RSI enters the overbought zone

Short Exit

  • SL: Swing high
  • TP: Fixed take‑profit, or exit when RSI enters the oversold zone

Edge & limitations

HalfTrend reacts to trend shifts and can generate trend‑reversal signals relatively early. It performs better in strong trending market conditions. However, this feature also brings potential for misjudged trends. Especially in range‑bound market, HalfTrend toggles between trends repeatedly. Even minor pullbacks within a trending market may be misinterpreted as trend reversals, producing numerous false signals. On the other hand, RSI(2) uses a very short period and frequently enters overbought or oversold zones.

3.EA implementation

Core logic

It should be noted that HalfTrend is not included as a built‑in indicator inside MT5. I downloaded the free HalfTrend indicator from Half Trend indicator for MetaTrader 5 Download - Free and referenced this exact version inside the EA code.

The three entry conditions of this strategy trigger sequentially instead of needing to be satisfied simultaneously. For this reason, a finite‑state‑machine architecture is adopted for implementation. The EA runs with the following logic: it first reads the HalfTrend trend status. If trend conditions are met and RSI first hits overbought or oversold levels, the EA then waits for reversal signals. All signal checks are performed only on bar close.

For money‑management logic, swing lows are determined by looking back over N bars to set stop‑loss levels. Take‑profit is calculated with a fixed multiplier. During real‑world testing, I observed that RSI(2) is extremely sensitive and often flips to the opposite extreme zone immediately after an entry signal fires. The EA also enforces single‑position only trading.

Core code snippet:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
switch(g_state)
{
case STATE_IDLE:
{
//Look for setup condition to enter waiting mode
if(trendUp)
{
//Uptrend active + first RSI below oversold → wait for bullish reversal
if(rsiVal < RsiOversoldVal)
{
g_state = STATE_WAIT_LONG_REVERSE;
}
}
else if(trendDown)
{
//Downtrend active + first RSI above overbought → wait for bearish reversal
if(rsiVal > RsiOverboughtVal)
{
g_state = STATE_WAIT_SHORT_REVERSE;
}
}
break;
}
case STATE_WAIT_LONG_REVERSE:
{
//Exit waiting mode if HalfTrend bullish trend ends
if(!IsHalfTrendUp(curShift))
{
//Trend reversed, cancel waiting for bar reversal signal
}
//【Long reversal signal】Close price breaks above previous bar high
double closeCur = iClose(_Symbol,_Period,curShift);
double highPrev = iHigh(_Symbol,_Period,prevShift);
if(closeCur > highPrev)
{
//Long entry logic
}
break;
}
case STATE_WAIT_SHORT_REVERSE:
{
//Short entry logic
}
}

Parameter Settings

Parameter Default Value Description
MagicNumber 12345 EA magic number used to identify orders belonging to this EA
LotSize 0.1 Trading lot size
RsiPeriod 2 RSI period
RsiOversoldVal 10 Oversold threshold for long entries
RsiOverboughtVal 90 Overbought threshold for short entries
HtAmplitude 4 Amplitude parameter for the HalfTrend indicator
HtChannelDeviation 2 Channel deviation parameter for the HalfTrend indicator
TpMultiplier 2 Take‑profit multiple relative to stop‑loss distance
SlLookbackBars 5 Number of bars used for look‑back calculation of stop‑loss

EA Source Code / Download

Click to download

5. Limitations & Disclaimer

No backtest / forward‑test results provided. Users must verify robustness via personal backtest and demo forward‑testing before live usage.

Not financial advice. Forex trading involves substantial risk.