Strategy · Pine Script v6 · On the chart

EUR/USD London Breakout [trugurpala]

by trugurpala

This strategy tracks the high and low range established during the Asian trading session and executes breakout trades during the London session.

View on GitHub

GitHub stars4on the repository
Pine versionv6current
Lines of code87
Settings3inputs
LicenceMIT
Last update2 months ago3 Aug 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  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

87 lines of Pine Script v6 from global-markets/19_eurusd_london_breakout.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

19_eurusd_london_breakout.pine
//@version=6
// EUR/USD — London Session Breakout Strategy
// Author: Ugur Pala · github.com/trugurpala/pinescriptv6
// TradingView: https://tr.tradingview.com/u/trugurpala/
//
// TR: Londra seansı açılmadan önceki dar Asya aralığını belirler,
//     Londra açılışında bu aralığın kırılması üzerine giriş yapar.
//     Forex piyasasında en güvenilir kırılma stratejilerinden biri.
// EN: Identifies the tight Asia session range before London open,
//     enters on breakout of that range at London open.
//     One of the most reliable breakout strategies in Forex.
//
// Sembol / Symbol: FX:EURUSD / OANDA:EURUSD
// Önerilen TF / Recommended TF: 15M, 1H
strategy("EUR/USD London Breakout [trugurpala]",
    overlay           = true,
    initial_capital   = 10000,
    default_qty_type  = strategy.percent_of_equity,
    default_qty_value = 2,
    commission_type   = strategy.commission.percent,
    commission_value  = 0.005,
    slippage          = 1)

// ── Inputs ───────────────────────────────────────────────────────────────────
float atrMult   = input.float(1.5, "SL ATR Mult", step=0.1)
float rrRatio   = input.float(2.0, "R:R Ratio",   step=0.1)
bool  closeEOD  = input.bool(true, "Close at NY Close (21:00 GMT)")

// ── Seans Tanımları ──────────────────────────────────────────────────────────
bool asiaRange   = not na(time(timeframe.period, "0300-0700", "GMT"))
bool inLondon    = not na(time(timeframe.period, "0800-1600", "GMT"))
bool nyClose     = not na(time(timeframe.period, "2100-2101", "GMT"))

if closeEOD and nyClose
    strategy.close_all(comment="NY Close")

// ── Asya Aralığı ─────────────────────────────────────────────────────────────
var float asiaHigh  = na
var float asiaLow   = na
var bool  rangeDone = false

bool newDay = ta.change(time("D")) != 0
if newDay
    asiaHigh  := na
    asiaLow   := na
    rangeDone := false

if asiaRange
    asiaHigh := na(asiaHigh) ? high : math.max(asiaHigh, high)
    asiaLow  := na(asiaLow)  ? low  : math.min(asiaLow,  low)

if not asiaRange and not na(asiaHigh)
    rangeDone := true

// ── Sinyaller ────────────────────────────────────────────────────────────────
float atrVal     = ta.atr(14)
bool  longBreak  = rangeDone and inLondon
                    and ta.crossover(close, asiaHigh)
                    and strategy.position_size == 0
bool  shortBreak = rangeDone and inLondon
                    and ta.crossunder(close, asiaLow)
                    and strategy.position_size == 0

// ── Entries ──────────────────────────────────────────────────────────────────
if longBreak
    float sl = close - atrMult * atrVal
    strategy.entry("Long", strategy.long)
    strategy.exit("Long Exit", "Long", stop=sl, limit=close + rrRatio * (close - sl))

if shortBreak
    float sl = close + atrMult * atrVal
    strategy.entry("Short", strategy.short)
    strategy.exit("Short Exit", "Short", stop=sl, limit=close - rrRatio * (sl - close))

// ── Visuals ──────────────────────────────────────────────────────────────────
plot(rangeDone ? asiaHigh : na, "Asia High", color.new(color.red,   30), linewidth=2, style=plot.style_linebr)
plot(rangeDone ? asiaLow  : na, "Asia Low",  color.new(color.green, 30), linewidth=2, style=plot.style_linebr)
bgcolor(asiaRange ? color.new(color.blue,   93) : na, title="Asia Range")
bgcolor(inLondon  ? color.new(color.yellow, 96) : na, title="London")
plotshape(longBreak,  "Long",  shape.triangleup,   location.belowbar, color.green, size=size.small)
plotshape(shortBreak, "Short", shape.triangledown, location.abovebar, color.red,   size=size.small)

// ── Alerts (alert() — strategy içinde çalışır) ───────────────────────────────
if longBreak
    alert("EURUSD London Breakout Long — " + str.tostring(close, "#.#####"), alert.freq_once_per_bar)
if shortBreak
    alert("EURUSD London Breakout Short — " + str.tostring(close, "#.#####"), alert.freq_once_per_bar)

Overview

EUR/USD London Breakout [trugurpala] draws directly on the price chart. When the price crosses above the Asian high or below the Asian low, it enters a position using two percent of equity. Exits rely on an ATR-based stop loss, a risk-reward take-profit target, and an optional end-of-day closure at the New York close. Inputs adjust the ATR multiplier, risk-to-reward ratio, and session exit toggle. Entries require flat positioning and active London market hours.

Details

Published by

trugurpala on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Breakout, Sessions & time

Markets

Forex

Timeframes

M15-H1

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.

Topics

aialgorithmic-tradingclaude-codecodexcoding-agentsgithub-copilotopen-sourcepine-scriptpine-script-v6technical-analysis

Settings

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

SettingTypeDefaultVariable
SL ATR Multfloat1.5atrMult
R:R Ratiofloat2.0rrRatio
Close at NY Close (21:00 GMT)booltruecloseEOD
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

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
53 stars

This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MPL-2.0 GitHub repository of BTCUSD 5M Optimized Strategy

Turtle MACD Time-Zone Filter

by skywalker0803r
42 stars

This strategy enters long when price closes above the prior Donchian high and short when it closes below the prior Donchian low, only while flat and inside a Taipei-hour window. It exits on a MACD histogram reversal or through an ATR stop and a percentage take

Strategy v5 BreakoutOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Turtle MACD Time-Zone Filter
39 stars

This intraday strategy implements Mark Fisher's Opening Range Breakout (ORB) methodology tailored for index futures like ES and NQ. It calculates session opening ranges, volume z-scores, and VWAP bands to plot support, resistance, and confirmation levels on th

Strategy v6 BreakoutSessions & time Repaints
Updated 4 days ago · MIT GitHub repository of Futures Intraday Pro (ES/NQ) Strategy

Morning Scalp

by benso87
24 stars

This strategy tracks an opening session time range to establish directional bias and triggers pullback trades using Stochastic RSI. Once price breaks out of the initial range, it establishes a directional bias and enters when the Stochastic RSI crosses over in

Strategy v5 Sessions & timeBreakout
Updated 4 years ago · MPL-2.0 GitHub repository of Morning Scalp
23 stars

This strategy evaluates breakout and trend opportunities on the price chart using a weighted composite score of volume, trend, and candlestick structure. It tracks volume spikes, fast and slow EMAs, higher-timeframe EMA trend alignment, opening ranges, and ses

Strategy v6 TrendVolume Repaints
Updated 3 weeks ago · Custom licence GitHub repository of TradingAlpha Point-Clip Strategy

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