
この戦略は,ロンドン時間帯のSMAクロスETH反転取引戦略と呼ばれる.この戦略の主な考えは,ロンドン時間帯の高流動性を利用し,SMA均線の金叉死叉信号と組み合わせて,ETH/USDTの主流のデジタル通貨取引ペアを反転取引することである.
この策略の核心的な論理は,まずロンドン時間の取引時間を決定し,その後,一定の周期のSMA平均線を計算し,その後,ロンドン時間に価格がSMAと金叉または死叉を発生したかどうかを判断することです.具体的には,この策略は,まずロンドン時間の開始と終了時間を定義し,その後,SMA平均線の長さのパラメータを50周期に設定します.その基礎で,この策略は,ta.sma () 関数を使用して50周期のSMA平均線を計算します.
この戦略の重要な利点は,ロンドン時間の高い流動性を利用して取引し,より良い入場機会を得ることです.同時に,SMA平均線の金叉死叉信号は,古典的で効果的な技術指標信号です.したがって,この組み合わせは,偽信号を一定程度にフィルターし,戦略の安定性と率を向上させることができます.
この戦略にはいくつかのリスクがあります.
これらのリスクは,以下の方法で制御・解決できます.
この戦略は,以下の点で最適化できます.
全体として,この戦略は,流動性の高い時段取引と均線交差のクラシック技術指標の組み合わせによって,よりシンプルで実用的なショートライン反転取引戦略を実現します. この戦略は,資金活用率が高い,技術指標がシンプル,実行しやすいなどの利点があります. しかし,一定のリスクがあり,パラメータ,ストップ,取引時間などのテストと最適化が必要で,より安定した収益性を得ることができます.
/*backtest
start: 2023-01-11 00:00:00
end: 2024-01-17 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("London SMA Strategy ", overlay=true)
// Define London session times
london_session_start_hour = 6
london_session_start_minute = 59
london_session_end_hour = 15
london_session_end_minute = 59
// Define SMA input parameters
sma_length = input.int(50, title="SMA Length")
sma_source = input.source(close, title="SMA Source")
// Calculate SMA
sma = ta.sma(sma_source, sma_length)
// Convert input values to timestamps
london_session_start_timestamp = timestamp(year, month, dayofmonth, london_session_start_hour, london_session_start_minute)
london_session_end_timestamp = timestamp(year, month, dayofmonth, london_session_end_hour, london_session_end_minute)
// Define backtesting time range
start_date = timestamp(2021, 1, 1, 0, 0)
end_date = timenow
// Filter for London session and backtesting time range
in_london_session = time >= london_session_start_timestamp and time <= london_session_end_timestamp
in_backtesting_range = time >= start_date and time <= end_date
// Long condition: Close price crosses above SMA during London session
long_condition = ta.crossover(close, sma)
// Short condition: Close price crosses below SMA during London session
short_condition = ta.crossunder(close, sma)
// Plot SMA for reference
plot(sma, title="SMA", color=color.blue)
// Strategy entries and exits
if (long_condition)
strategy.entry("Long", strategy.long)
if (short_condition)
strategy.entry("Short", strategy.short)