
双時間開盤区間突破追跡ストップ・損失量化取引戦略は,ロンドンとニューヨークの取引時間開盤15分前の価格区間に基づく突破取引システムである.この戦略は,この2つの主要金融センターの開盤初期における価格動力を捕捉し,価格が最初の15分間に形成された高点または低点を破るときに,対応する方向への取引を行う.この戦略の核心的な特徴は,利益を保護しながら,利益の持続的な増加を可能にするストップ・損失を追跡するメカニズムを採用することです.この戦略は,同時に,取引品質を向上させるために選択可能な均一線フィルタリング条件を提供します.
この戦略の動作は,ロンドン市場が開いている (ニューヨーク時間3時00分から3時15分) とニューヨーク市場が開いている (ニューヨーク時間9時30分から9時45分) の2つの重要な時間帯を中心に展開されています. 戦略の作業プロセスは次のとおりです.
策略の重要な論理は,取引の初期の価格方向の突破を捕捉することであり,これは通常,その後発生する可能性がある傾向的な行動を予告する.追跡停止の仕組みを使用することにより,戦略は,すでに有利な取引を保護しながら,有利な取引を継続できるようにする.
この戦略の利点は以下の通りです.
この戦略は合理的に設計されていますが,以下の潜在的なリスクがあります.
戦略的分析から,以下のような最適化方向が考えられます.
双期開場区間突破追跡ストップ損失量化取引戦略は,ロンドンとニューヨークの2つの金融センターの開場時間を対象に設計された突破取引システムである.開場初期の価格の動きと方向を捕捉し,追跡ストップメカニズムと組み合わせることで,この戦略は,リスクを制御しながら,利益の可能性を最大化することができる.偽突破や市場環境依存などのリスクがあるものの,合理的なパラメータ設定と追加のフィルタリング条件によって,戦略の安定性と収益性をさらに向上させることができる.この戦略は,波動性があり,大きな流動性のある市場に特に適しており,トレーダーは自身のリスク承受能力と取引目標に応じて適切に調整する必要があります.
/*backtest
start: 2024-04-27 00:00:00
end: 2025-04-25 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"SOL_USDT"}]
*/
//@version=6
strategy("ORB-LD-NY-Trail Strategy", overlay=true,
default_qty_type=strategy.fixed, default_qty_value=1,
calc_on_order_fills=true, calc_on_every_tick=true)
// =========================
// USER INPUTS
// =========================
riskReward = input.float(2.0, "Risk-Reward Ratio", minval=1.0)
minBoxSize = input.float(2.0, "Minimum Box Size (points)")
trailStopTicks = input.int(8, "Trailing Stop (ticks)", minval=1)
useEmaFilter = input.bool(false, "Use 5-min EMA Filter?")
tickSize = syminfo.mintick // auto-detect min tick for symbol
trailStopOffset = trailStopTicks * tickSize
emaSource = request.security(syminfo.tickerid, "5", ta.ema(close, 200)) // 5-min chart EMA
// =========================
// SESSION TIMES
// =========================
londonStart = timestamp("America/New_York", year, month, dayofmonth, 3, 0)
londonEnd = timestamp("America/New_York", year, month, dayofmonth, 3, 15)
nyStart = timestamp("America/New_York", year, month, dayofmonth, 9, 30)
nyEnd = timestamp("America/New_York", year, month, dayofmonth, 9, 45)
inLondon = time >= londonStart and time <= londonEnd
inNY = time >= nyStart and time <= nyEnd
// =========================
// ONE TRADE PER SESSION FLAGS
// =========================
var bool londonTraded = false
var bool nyTraded = false
// =========================
// LONDON BOX
// =========================
var float londonHigh = na
var float londonLow = na
var float londonBoxHigh = na
var float londonBoxLow = na
if inLondon
if na(londonHigh)
londonBoxHigh := na
londonBoxLow := na
londonTraded := false
londonHigh := na(londonHigh) ? high : math.max(londonHigh, high)
londonLow := na(londonLow) ? low : math.min(londonLow, low)
if not inLondon and na(londonBoxHigh) and not na(londonHigh) and not na(londonLow)
londonBoxHigh := londonHigh
londonBoxLow := londonLow
londonHigh := na
londonLow := na
if time > londonEnd and not na(londonBoxHigh) and not londonTraded
boxRange = londonBoxHigh - londonBoxLow
if boxRange >= minBoxSize
// Standard SL/TP logic
longSL = londonBoxHigh - boxRange
longTP = londonBoxHigh + boxRange * riskReward
shortSL = londonBoxLow + boxRange
shortTP = londonBoxLow - boxRange * riskReward
// === LONDON LONG ===
condLong1 = close[1] <= londonBoxHigh
condLong2 = close > londonBoxHigh
condLong3 = (not useEmaFilter) or (close > emaSource)
if condLong1 and condLong2 and condLong3
strategy.entry("London Long", strategy.long)
strategy.exit("Exit London Long", from_entry="London Long",
stop=longSL, limit=longTP,
trail_points=trailStopOffset)
londonTraded := true
// === LONDON SHORT ===
condShort1 = close[1] >= londonBoxLow
condShort2 = close < londonBoxLow
condShort3 = (not useEmaFilter) or (close < emaSource)
if not londonTraded and condShort1 and condShort2 and condShort3
strategy.entry("London Short", strategy.short)
strategy.exit("Exit London Short", from_entry="London Short",
stop=shortSL, limit=shortTP,
trail_points=trailStopOffset)
londonTraded := true
// =========================
// NY BOX
// =========================
var float nyHigh = na
var float nyLow = na
var float nyBoxHigh = na
var float nyBoxLow = na
if inNY
if na(nyHigh)
nyBoxHigh := na
nyBoxLow := na
nyTraded := false
nyHigh := na(nyHigh) ? high : math.max(nyHigh, high)
nyLow := na(nyLow) ? low : math.min(nyLow, low)
if not inNY and na(nyBoxHigh) and not na(nyHigh) and not na(nyLow)
nyBoxHigh := nyHigh
nyBoxLow := nyLow
nyHigh := na
nyLow := na
if time > nyEnd and not na(nyBoxHigh) and not nyTraded
boxRange = nyBoxHigh - nyBoxLow
if boxRange >= minBoxSize
longSL = nyBoxHigh - boxRange
longTP = nyBoxHigh + boxRange * riskReward
shortSL = nyBoxLow + boxRange
shortTP = nyBoxLow - boxRange * riskReward
// === NY LONG ===
condNYLong1 = close[1] <= nyBoxHigh
condNYLong2 = close > nyBoxHigh
condNYLong3 = (not useEmaFilter) or (close > emaSource)
if condNYLong1 and condNYLong2 and condNYLong3
strategy.entry("NY Long", strategy.long)
strategy.exit("Exit NY Long", from_entry="NY Long",
stop=longSL, limit=longTP,
trail_points=trailStopOffset)
nyTraded := true
// === NY SHORT ===
condNYShort1 = close[1] >= nyBoxLow
condNYShort2 = close < nyBoxLow
condNYShort3 = (not useEmaFilter) or (close < emaSource)
if not nyTraded and condNYShort1 and condNYShort2 and condNYShort3
strategy.entry("NY Short", strategy.short)
strategy.exit("Exit NY Short", from_entry="NY Short",
stop=shortSL, limit=shortTP,
trail_points=trailStopOffset)
nyTraded := true
// Visual session background
bgcolor(inLondon ? color.new(color.fuchsia, 85) : na)
bgcolor(inNY ? color.new(color.green, 85) : na)