Strategy · Pine Script v5 · On the chart

Three Bar Reversal Pattern

by feliperazeek

This strategy detects three-bar reversal patterns in normal, enhanced or both forms, derives support and resistance from them as levels or zones, and trades the reversals on the price chart.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code336
Settings26inputs
LicenceNone stated
Last update1 year ago11 Oct 2025

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

An optional trend filter uses a moving average cloud, Supertrend or Donchian channels, aligned or opposite to the signal. A stop loss and take profit are on by default, based on ATR, a fixed distance or a percentage, with an optional trailing stop. It limits concurrent positions and sizes by percent of equity.

Details

Published by

feliperazeek on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

Candlestick patterns, Support & resistance, Breakout

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Pattern TypestringAllbrpType
Derived Support and ResistancestringLevelbrpSR
Bullish Reversal Patternscolor#2962ffbrpAC
Bearish Reversal Patternscolor#ff9800brpSC
FilteringstringNonetrendType
trendFiltstringAlignedtrendFilt
Bullish Trendcolor#089981trendAC
Bearish Trendcolor#f23645trendSC
TypestringHMAmaType
Fast Lengthint50maFLength
Slow Lengthint200maSLength
ATR Lengthint10atrPeriod
Show all 26 settings
SettingTypeDefaultVariable
Factorfloat3factor
Lengthint13length
Use Stop LossbooltrueuseStopLoss
Use Take ProfitbooltrueuseTakeProfit
Stop Loss TypestringATRstopLossType
Take Profit TypestringATRtakeProfitType
ATR Multiplierfloat2.0atrMultiplier
Fixed Stop Loss (points)float1.0fixedStopLoss
Fixed Take Profit (points)float2.0fixedTakeProfit
Stop Loss %float1.0stopLossPercent
Take Profit %float2.0takeProfitPercent
Maximum Concurrent Positionsint1maxPositions
Use Trailing StopboolfalseuseTrailingStop
Trailing Stop %float1.0trailPercent
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

3 stars

This strategy detects Opening Range Breakouts in a specified session. It calculates the high and low of the opening range bar then plots these levels on the price chart and fills the area between them. Candles are colored based on their relation to the ORB hig

Strategy v5 BreakoutSupport & resistance
Updated 5 months ago · None stated GitHub repository of ORB Hooplah Strategy

This trend-following strategy executes a classic Donchian channel breakout system designed to cross-validate backtest results against external framework benchmarks. It triggers a long entry when the closing price breaks above the highest high of the prior entr

Strategy v6 BreakoutTrend
Updated yesterday · AGPL-3.0 GitHub repository of Forven S01509 - Simple Donchian 20/10 Breakout
257 stars

This strategy plots running pivot highs as red R circles and pivot lows as blue S circles directly on the price chart. It computes an EMA 3 and a Cto trend line from close prices, then generates long signals on upward EMA-Cto crossovers combined with price pos

Strategy v6 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Best Chart 1m Strategy Candle Bar

STRG-HOLP

by harryguiacorn
219 stars

STRG-HOLP is a trading strategy that identifies High of Low Period (HOLP) and Low of High Period (LOHP) breakout setups. It tracks the lowest low or highest high over a user-defined lookback window. A long trade opens when the close breaks above the high of th

Strategy v5 BreakoutSupport & resistance
Updated 1 year ago · None stated GitHub repository of STRG-HOLP
106 stars

This script monitors opening gap conditions and breakout behavior relative to the first candle's range across up to twenty configurable stock tickers. It detects whether following bars remain inside the opening range before breaking out, displaying the status

Strategy v4 Screeners & dashboardsBreakout Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 1St Bar GAP+BkOut Screener v2 by RM

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers