
この戦略は,前日の価格区間突破と指数移動平均 ((EMAs)) を組み合わせた日内取引戦略である.この戦略は,価格突破の前の取引日の高点または低点のタイミングを識別し,急速および遅いEMAsの確認シグナルと組み合わせて取引する.この戦略は,短期価格の動きを捕捉し,固定ストップポイント数とリスク・リターン比率を設定することによってリスクを管理することに焦点を当てている.
戦略の中核となるロジックは、次の主要な要素に基づいています。
この戦略は,価格の突破とEMAsのトレンド確認を組み合わせた方法で,信頼性の高い日内取引システムを実現する.戦略の核心的な優位性は,その明確な論理構造と完善したリスク管理機構にある.戦略は,推奨された最適化方向によって,その安定性と収益性をさらに向上させることができる.実際の取引では,偽突破と滑り場リスクに特に注意を払い,実際の市場条件に応じてパラメータを調整する必要があります.
/*backtest
start: 2025-02-16 17:00:00
end: 2025-02-18 14:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"SOL_USDT"}]
*/
//@version=5
strategy("GER40 Momentum Breakout Scalping", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=1)
//———— Input Parameters —————
stopLossPoints = input.int(30, title="Stop Loss (Pips)", minval=1) // Updated to 30 pips
riskReward = input.float(2.0, title="Risk Reward Ratio", step=0.1)
useTimeFilter = input.bool(false, title="Use Time Filter? (Sessions in SAST)")
// Define sessions (SAST) if needed
session1 = "0900-1030"
session2 = "1030-1200"
session3 = "1530-1730"
//———— Time Filter Function —————
inSession = true
if useTimeFilter
// TradingView's session function uses the chart's timezone.
// Adjust the session times if your chart timezone is not SAST.
inSession = time(timeframe.period, session1) or time(timeframe.period, session2) or time(timeframe.period, session3)
//———— Get Previous Day's High/Low —————
// Fetch the previous day's high/low using the daily timeframe. [1] refers to the previous completed day.
prevHigh = request.security(syminfo.tickerid, "D", high[1])
prevLow = request.security(syminfo.tickerid, "D", low[1])
//———— Calculate EMAs on the 1-minute chart —————
emaFast = ta.ema(close, 9)
emaSlow = ta.ema(close, 21)
//———— Define Breakout Conditions —————
longCondition = close > prevHigh and emaFast > emaSlow
shortCondition = close < prevLow and emaFast < emaSlow
//———— Entry & Exit Rules —————
if inSession
// Long breakout: Price breaks above previous day's high
if (longCondition)
strategy.entry("Long", strategy.long)
strategy.exit("Exit Long", "Long",
stop = strategy.position_avg_price - stopLossPoints * syminfo.mintick,
limit = strategy.position_avg_price + stopLossPoints * riskReward * syminfo.mintick)
// Short breakout: Price breaks below previous day's low
if (shortCondition)
strategy.entry("Short", strategy.short)
strategy.exit("Exit Short", "Short",
stop = strategy.position_avg_price + stopLossPoints * syminfo.mintick,
limit = strategy.position_avg_price - stopLossPoints * riskReward * syminfo.mintick)
//———— Plot Indicators & Levels —————
plot(emaFast, color=color.blue, title="EMA 9")
plot(emaSlow, color=color.red, title="EMA 21")
plot(prevHigh, color=color.green, style=plot.style_linebr, title="Prev Day High")
plot(prevLow, color=color.maroon, style=plot.style_linebr, title="Prev Day Low")