
この戦略は,RSI指標と平均回帰原理に基づいた定量取引システムである.これは,価格変動の範囲と閉店価格の位置を組み合わせた市場の過剰買いと過剰売り状態を識別することによって,市場の逆転の機会を捕捉する.戦略の核心思想は,市場の極端な状態が発生した後に回帰の機会を見つけ,厳しい入場条件とダイナミックストップを設定してリスクを管理することです.
戦略は,取引シグナルを決定するために複数のフィルターメカニズムを使用します. まず,価格は10回の新低を創造し,市場が超売り状態にあることを示します. 次に,その日の価格変動範囲は,市場の変動が加剧していることを示す約10取引日の最大値を要求します. 最後に,閉店価格が当日の価格区画の上四分の一にあるかどうかを判断して潜在的な反転を確認します.
これは,構造が整った,論理が明確な平均値還元戦略である. 多重条件フィルタリングと動的ストップ・損失管理により,戦略は,リスクを制御しながら,市場の超落反彈の機会を効果的に捕捉することができる. いくつかの制限があるが,合理的な最適化と完善によって,戦略の全体的なパフォーマンスは,改善の余地がある. 投資家は,実物市場での適用時,特定の市場特性と自身のリスク承受能力に応じてパラメータを調整する必要があることを推奨する.
/*backtest
start: 2024-11-04 00:00:00
end: 2024-12-04 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Larry Conners SMTP Strategy", overlay=true, margin_long=100, margin_short=100)
// --- Inputs ---
// Corrected the input type declaration by removing 'type='
tickSize = input.float(0.01, title="Tick Size (e.g., 1/8 for stocks)")
// --- Calculate conditions ---
// 1. Today the market must make a 10-period low
low10 = ta.lowest(low, 10)
is10PeriodLow = low == low10
// 2. Today's range must be the largest of the past 10 bars
rangeToday = high - low
maxRange10 = ta.highest(high - low, 10)
isLargestRange = rangeToday == maxRange10
// 3. Today's close must be in the top 25 percent of today's range
rangePercent = (close - low) / rangeToday
isCloseInTop25 = rangePercent >= 0.75
// Combine all buy conditions
buyCondition = is10PeriodLow and isLargestRange and isCloseInTop25
// --- Buy Entry (on the next day) ---
var float buyPrice = na
var bool orderPending = false
var float stopLoss = na // Initialize stopLoss at the top level to avoid 'Undeclared identifier' errors
if (buyCondition and strategy.position_size == 0)
buyPrice := high + tickSize
stopLoss := low
orderPending := true
// Condition to place buy order the next day or the day after
if orderPending and ta.barssince(buyCondition) <= 2
strategy.entry("Buy", strategy.long, stop=buyPrice)
orderPending := false
// --- Stop-Loss and Trailing Stop ---
if (strategy.position_size > 0)
stopLoss := math.max(stopLoss, low) // Move stop to higher lows (manual trailing)
strategy.exit("Exit", from_entry="Buy", stop=stopLoss)
// --- Plotting ---
// Highlight buy conditions
bgcolor(buyCondition ? color.new(color.green, 50) : na)
//plotshape(series=buyCondition, location=location.belowbar, color=color.green, style=shape.labelup, text="Buy Setup")
// Plot Stop-Loss level for visualization
//plot(strategy.position_size > 0 ? stopLoss : na, color=color.red, linewidth=2, title="Stop-Loss Level")