
この戦略は,ブリン帯の指標に基づくトレンド反転取引システムで,価格とブリン帯の接触関係を監視することで,市場の反転の機会を捉える.この戦略は5分間の時間周期で動作し,20周期の移動平均をブリン帯の中央軌道として使用し,ブリン帯の上下走行のパラメータとして3.4倍標準差を設定します.価格がブリン帯の上下走行に触れたときに,システムは対応する取引信号を発信します.
戦略の核心的な論理は,価格回帰理論に基づいています. 価格がブリンを下回る軌道に触れたとき,システムは市場が過剰に売り切れたと判断し,過剰に売る傾向があります. 価格がブリンを下回る軌道に触れたとき,システムは市場が過剰に売り切れたと判断し,空売りする傾向があります.具体的には:
この戦略は,ブリン帯の接触によって市場逆転の機会を捕捉し,論理的明晰さ,リスク制御の合理的な特性を有する.合理的なパラメータ設定と完善な取引規則により,戦略は,振動的な市場において良好な安定性を表している.しかし,実況適用では,トレンド突破リスクに注意する必要がある.他の技術指標と組み合わせた取引確認を推奨し,市場状況に応じて戦略パラメータの動向を調整する.最適化の方向は,主に多周期協調,トレンドフィルタリング,動向パラメータの調整などの側面に焦点を当てている.
/*backtest
start: 2024-11-11 00:00:00
end: 2024-12-11 00:00:00
period: 5h
basePeriod: 5h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("5-Min Bollinger Bands Touch Strategy", overlay=true, margin_long=100, margin_short=100)
// Input parameters
length = input(20, title="Bollinger Bands Length")
mult = input(3.4, title="Bollinger Bands Deviation")
// Bollinger Bands calculation
basis = ta.sma(close, length)
dev = mult * ta.stdev(close, length)
upper = basis + dev
lower = basis - dev
// Plot Bollinger Bands
plot(basis, color=color.blue, title="Basis")
p1 = plot(upper, color=color.red, title="Upper Band")
p2 = plot(lower, color=color.green, title="Lower Band")
fill(p1, p2, color=color.new(color.gray, 90))
// Bullish buying condition: 5-min low touches lower Bollinger Band
bullish_entry = low <= lower and low[1] > lower[1]
// Bearish selling condition: 5-min high touches upper Bollinger Band
bearish_entry = high >= upper and high[1] < upper[1]
// Entry and exit conditions
longCondition = bullish_entry
shortCondition = bearish_entry
// Strategy entries
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)
// Optional: Add exit conditions (you may want to customize these)
// Example: Exit long position after a certain profit or loss
strategy.close("Long", when = high >= basis)
strategy.close("Short", when = low <= basis)
// Alerts
alertcondition(bullish_entry, title='Bullish BB Touch', message='5-min low touched Lower Bollinger Band')
alertcondition(bearish_entry, title='Bearish BB Touch', message='5-min high touched Upper Bollinger Band')
// Plot entry points
plotshape(bullish_entry, title="Bullish Entry", location=location.belowbar, style=shape.triangleup, size=size.small, color=color.green)
plotshape(bearish_entry, title="Bearish Entry", location=location.abovebar, style=shape.triangledown, size=size.small, color=color.red)