RSI Trendline Breakouts EA

RSI Trendline Breakout EA 

This EA is a highly specialized breakout strategy that ignores price levels entirely—it draws and trades trendlines directly on the RSI oscillator, detecting breakouts before they happen on the price chart.

🧠 Core Concept

Instead of standard support/resistance on price, this EA:

  1. Identifies pivot highs and pivot lows on the RSI line.

  2. Connects consecutive lower highs to form a descending resistance line.

  3. Connects consecutive higher lows to form an ascending support line.

  4. Waits for the RSI to break beyond these lines (with a user‑defined buffer).

  5. Executes a BUY when RSI breaks above the descending resistance (bullish breakout).

  6. Executes a SELL when RSI breaks below the ascending support (bearish breakdown).

All logic is evaluated strictly on fully closed candles, exactly as TradingView does.

🔍 How It Works – Step by Step

1. Pivot Detection (The Foundation)

For every closed bar, the EA checks if it forms a swing high or swing low over a  Lookback Range  (default 4):

  • Pivot High: The central bar’s RSI is higher than the  Lookback Range  bars on both its left and right sides.

  • Pivot Low: The central bar’s RSI is lower than the  Lookback Range  bars on both sides.

Once detected, the bar’s bar index (X) and RSI value (Y) are stored as a raw pivot point.

2. Trendline Formation (TV‑Style)

  • Resistance (PH) – Only connects pivots when the new pivot high is lower than the previous one. This creates a descending line.

  • Support (PL) – Only connects pivots when the new pivot low is higher than the previous one. This creates an ascending line.

When two valid consecutive pivots exist, the trendline becomes “active”, and the EA stores its start/end coordinates.

3. Breakout Monitoring

On every new bar, the EA:

  • Projects the active trendline to the current bar index (X‑coordinate).

  • Compares the current RSI value against the projected Y‑value plus/minus the  RSI Difference  buffer.

  • A breakout is triggered only if the RSI closes beyond the line by the specified buffer amount.

4. Trade Execution

  • Buy Signal: RSI breaks above a descending resistance line ( ph_active ) → market BUY order.

  • Sell Signal: RSI breaks below an ascending support line ( pl_active ) → market SELL order.

  • Once a breakout is registered, the corresponding trendline is immediately deactivated to prevent re‑entries on the same line.

5. Position Management

  • Fixed Stop Loss and Take Profit (in points) are attached to every trade.

  • No position‑sizing logic, no trailing stops, no grid—each trade is independent and closed purely by SL/TP.

✅ Key Advantages

Advantage Description

Leading Indicator RSI breakouts often precede price breakouts, giving you an early entry advantage.
Dynamic & Adaptive Trendlines are not static; they constantly update as new pivots form, automatically adjusting to changing market structure.
False‑Signal Filter The  RSI Difference  buffer prevents tiny, insignificant crosses from triggering premature entries.
No Repainting Since all logic is evaluated on closed bars, signals are final and do not change on subsequent ticks.
Clear Visual Feedback Large arrows (⬆ / ⬇) are drawn on the main price chart at the signal candle for immediate visual confirmation.

⚙️ Input Parameters




Styling InpPLowCol clrRed Color for pivot low markers (visual only, currently not drawn in code but reserved).
InpPHighCol clrSeaGreen Color for pivot high markers (visual only, reserved).

🎯 Strategy Philosophy

  • Mean‑Reversion on RSI? – No. This is a breakout system that uses RSI structure rather than overbought/oversold levels.

  • Why RSI trendlines? – The RSI often forms cleaner, more consistent patterns than raw price, leading to earlier and more reliable breakout signals.

  • Fixed Risk/Reward – Every trade has a fixed 1:2 risk‑reward ratio , ensuring statistical consistency over many trades.

💡 Best Use Cases

  • Timeframes: Works well from 15‑minute to 4‑hour charts. Lower timeframes may generate too many pivots; higher timeframes produce very few signals.

  • Instruments: Best on liquid forex pairs, and commodities (Gold, Oil) where RSI exhibits clear swing structure.

  • Market Conditions: Excels in trending markets where breakouts of RSI trendlines lead to sustained moves. Can be whipsawed in extremely choppy, sideways markets.

⚠️ Important Nuances & Limitations

Nuance Explanation
No Trade Overlap A trendline is deactivated immediately after its breakout. A new trendline must form (requiring two new pivots) before another signal can occur.
RSI Pivot Strictness The pivot definition requires strict inequality (higher/lower), not equal. This matches TradingView’s  ta.pivothigh  /  ta.pivotlow  logic.
History Depth The EA scans back  1500  bars to build the initial state. Ensure your chart has enough history.
Visual Arrows The arrows are drawn on the main price chart, not on the RSI sub‑window, to make signals easier to spot.
Fixed Point Values SL and TP are in points, not pips. For a 5‑digit broker,  350  points =  35.0  pips. Adjust according to your broker’s point size.
No Partial Closes Positions are either fully closed by SL/TP or remain open until then. No scaling in/out.

Altri dall’autore
Quant MAR
Robert Davis Waweru Mugure
I have been using this product for a while and although martingale strategies pose great risk this product shows great results with proper discipline and strict rules. 1. use sent account min deposit 1000 usd which translates to 100000 cents.  2. if you dont have a cent account recommeded broker link.   https://one.justmarkets.link/a/ljruy08oml&nbsp ; 3. use 1:3000 leverage. 4. be free to share results and comments 
Prop firms Destroyer
Robert Davis Waweru Mugure
PROP FIRM DESTROYER    EA – Built for Prop Firm Challenges & Consistent Profits A simple, rule-based scalping robot that trades any Forex pair or Gold (XAUUSD) with zero guesswork. It uses a proven 5-indicator filter system and never uses dangerous methods like martingale, grid, or trailing stops. Why Traders Love It 100% Mechanical – No emotions, no manual decisions. Every trade follows exact rules. Ultra-Strict Filters – Only trades during good market hours, low spread, and when you actually h
Gold sculper
Robert Davis Waweru Mugure
GoldScalper is a simple, reliable Expert Advisor (EA) for MetaTrader. It is a Pure Price Action Mean-Reversion Scalper made especially for XAUUSD on the M1 timeframe , but it works safely on any symbol. Advantages (Why traders love it) Pure price action only – no lagging indicators, no complicated settings. It reads the previous candle and waits for a clean pullback. Exact $2 risk & $2 profit every trade – fixed dollar risk/reward (1:1). You always know exactly how much you can lose or win. Supe
Hidden Markov Model
Robert Davis Waweru Mugure
Markov Inbuilt Scalper EA - Product Overview Core Concept This Expert Advisor combines   Markov Chain probability analysis   with   ATR-based risk management   to identify high-probability trading opportunities. It uses historical price patterns to predict market direction and executes trades with built-in protection mechanisms. Key Advantages 1.   Intelligent Market Prediction Uses a   Markov Transition Matrix   to analyze price patterns over a rolling window Calculates the probability of
Kalman Filter EA
Robert Davis Waweru Mugure
Kalman Filter EA  Core Concept This EA is a   strict  combining   Kalman filtering ,   Rate of Change (ROC) ,   Stochastic oscillator , and   Triple Exponential Moving Average (TEMA)   to generate high‑confidence entry signals. It works exclusively on   closed candles   and manages each trade independently with fixed Stop Loss and Take Profit. How It Works (Step‑by‑Step) Kalman Filter   – Smooths price data to reduce market noise, producing a filtered series ( kfilt ) and its velocity. Rat
Filtro:
Nessuna recensione
Rispondi alla recensione