
最初のの突破 - 動的追跡ストップとクローズオフの平仓戦略は,市場開設後の最初の線の価格区間を重要なサポートとレジスタンス位置として利用する一日の取引戦略である.この戦略は,最初のが形成された後に,価格がその高点または低点を破った後に再入場するのを待つ.同時に,最初のの価格区間に基づく動的追跡ストップの仕組みを採用し,一日の特定の時間に平仓を強制し,夜間のリスクを回避する.
この戦略は,市場開設後の最初の線によって形成される価格区間がしばしば重要な技術的意味を持つという市場観察に基づいている.戦略の核心論理は以下のとおりである.
この戦略は,価格が最初のの高点や低点を実際に突破した後に取引を開始する確認後のエントリーメカニズムを採用し,価格がこれらのレベルに触れたときすぐにエントリーするのではなく,偽の突破のリスクを軽減するのに役立ちます.
この戦略には多くの利点がありますが,いくつかの潜在的なリスクがあります.
この戦略は,上記のリスクに対して,以下の方向から最適化できます.
最初の突破 - ダイナミック・トラッキング・ストップ・ロズとクローズ・オフ・平仓戦略は,市場開設後の最初の線価格区間に基づく日中取引戦略である.それは,確認された価格突破シグナルを活用して入場し,市場波動に基づくダイナミック・トラッキング・ストップ・ロズメカニズムを採用してリスクを管理し,毎日の固定時間に平仓を強制して,夜間のリスクを回避する.
この戦略の利点は,入場信号の明瞭性,リスク管理の動態化,偽突破と夜間リスクの回避,市場の変動に適応し,過度の取引を制限し,完全に自動化できるものである.しかしながら,偽突破のリスク,不合理なストップ距離,大市場を見逃し,時間依存性,利潤目標の欠如,パラメータの感受性などの課題にも直面している.
フィルタリング条件の追加,ストップ・ローズ・メカニズムの最適化,部分利益メカニズムの導入,オーバーナイト・条件の追加,時間フィルタリングの追加,パラメータの最適化,自己適応メカニズムの追加,市場環境認識の追加,マルチタイム・フレーム分析の考慮,資金管理モジュールの追加などにより,戦略の安定性と収益性をさらに向上させることができる.
全体として,これは明瞭で論理的な,合理的な日内取引戦略であり,自動化されたシステムで日内取引を希望し,リスクを厳格に制御するトレーダーに適しています. ターゲティングされた最適化と適切なパラメータ調整により,この戦略は,異なる市場環境で安定したパフォーマンスを期待しています.
/*backtest
start: 2025-03-24 00:00:00
end: 2025-03-31 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"TRX_USDT"}]
*/
//@version=5
strategy("First Candle Breakout - Trailing Stop & EOD Close", overlay=true)
// User Inputs
startHour = input(9, "Start Hour (Exchange Time)")
startMinute = input(15, "Start Minute (Exchange Time)")
endHour = input(15, "End Hour (Exchange Time)") // Market closing hour
endMinute = input(30, "End Minute (Exchange Time)")
trailStopMultiplier = input(1.5, "Trailing Stop Multiplier") // 1.5x first candle range
// Variables to store the first candle's high & low
var float firstCandleHigh = na
var float firstCandleLow = na
var bool tradeTaken = false // Ensures only one trade per day
var int tradeDirection = 0 // 1 for long, -1 for short
var float trailStopLevel = na // Trailing stop level
// Identify first candle's high & low
if (hour == startHour and minute == startMinute and bar_index > 1)
firstCandleHigh := high
firstCandleLow := low
tradeTaken := false // Reset trade flag at start of day
tradeDirection := 0 // Reset trade direction
trailStopLevel := na // Reset trailing stop
// Calculate first candle range
firstCandleRange = firstCandleHigh - firstCandleLow
trailStopDistance = firstCandleRange * trailStopMultiplier
// Buy condition: Close above first candle high AFTER the first candle closes
longCondition = not na(firstCandleHigh) and close > firstCandleHigh and not tradeTaken and hour > startHour
if (longCondition)
strategy.entry("Buy", strategy.long, comment="Buy")
trailStopLevel := close - trailStopDistance // Set initial trailing stop
tradeTaken := true
tradeDirection := 1
// Sell condition: Close below first candle low AFTER the first candle closes
shortCondition = not na(firstCandleLow) and close < firstCandleLow and not tradeTaken and hour > startHour
if (shortCondition)
strategy.entry("Sell", strategy.short, comment="Sell")
trailStopLevel := close + trailStopDistance // Set initial trailing stop
tradeTaken := true
tradeDirection := -1
// Update trailing stop for long trades
if (tradeDirection == 1 and not na(trailStopLevel))
trailStopLevel := nz(trailStopLevel, close - trailStopDistance) // Initialize if na
trailStopLevel := math.max(trailStopLevel, close - trailStopDistance) // Adjust trailing stop up
if (close <= trailStopLevel) // Stop loss hit
strategy.close("Buy", comment="Trailing SL Hit")
// Update trailing stop for short trades
if (tradeDirection == -1 and not na(trailStopLevel))
trailStopLevel := nz(trailStopLevel, close + trailStopDistance) // Initialize if na
trailStopLevel := math.min(trailStopLevel, close + trailStopDistance) // Adjust trailing stop down
if (close >= trailStopLevel) // Stop loss hit
strategy.close("Sell", comment="Trailing SL Hit")
// Close trade at end of day if still open
if (tradeTaken and hour == endHour and minute == endMinute)
strategy.close_all(comment="EOD Close")