
この戦略は,ブリン帯と均線の組み合わせを使用してトレンド判断と入場を行う定量化取引戦略である. ブリン帯のトレンド認識能力と移動平均の波動効果を組み合わせて,市場のトレンド方向を効果的に識別し,トレンド方向の動きの中で入場することができる.
ブリン帯通路の最高値と最低値を計算し,市場動向の方向性を判断する
陽線実体サイズを計算し,止損と反転信号を判断する
トレンド方向の確認後,通路方向で入場する
移動平均を使って波をフィルターし,偽信号を避ける.
ブリン帯は価格の通路とトレンドの方向を明確に判断し,移動平均は波を起こす.両者は,トレンドを効果的に識別し,市場突発事件の影響を回避し,システムの安定性を保証する.
特定の周期内の陽線実体サイズ平均値を計算し,現在の周期実体サイズと比較することにより,トレンドの逆転を明確に判断し,ストップ・ロスの減仓を行い,戦略リスクを効果的に制御することができる.
戦略は,移動平均と通路方向の配合の条件で入場し,陽線実体大小ルールを利用して止損を行うため,システム全体で入場と止損ルールは非常に明確に体系化されている.
変動の状況では,価格が何度も下線に触れて,繰り返し小さな損失を引き起こす可能性があります.このとき,ポジションのサイズを小さくして,1回の損失を減らすべきです.
強いトレンドでは,短期的な価格の逆転が,ストップ・ロスのルールの打撃を誘発する可能性がある.この時点で,ストップ・ロスの幅を適切に緩め,トレンドの走行に追随する.
移動平均線とブリン帯のパラメータ設定が不適切で,誤認信号が発生する可能性がある場合.信号を安定的に信頼できるようにパラメータを適切に最適化すべきである.
移動平均のパラメータを調整して,滑らかさを減らすことで,トレンドの変化を早く発見できます.
トラックストップ,ATRストップなど,様々なストップルスを試して,最適のストップ方法を選択する.
膨大な歴史データに基づいた訓練モデルにより,トレンドを判断し,取引シグナルを発信します.
この戦略は,トレンド判断とリスク制御を総合的に考慮し,ブリン帯通路と移動平均を使用してトレンドを識別し,陽線実体サイズで止損する.戦略は,体系的であり,定量規則は明確であり,余剰利益を得るリスクを効果的に制御することができます.パラメータ最適化や機械学習などの方法による継続的な改善により,戦略はより安定して信頼性が高くなります.
/*backtest
start: 2023-12-14 00:00:00
end: 2023-12-21 00:00:00
period: 15m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
strategy("Noro's Bands Scalper Strategy v1.3", shorttitle = "Scalper str 1.3", overlay=true, default_qty_type = strategy.percent_of_equity, default_qty_value=100.0, pyramiding=0)
//Settings
needlong = input(true, defval = true, title = "Long")
needshort = input(true, defval = true, title = "Short")
takepercent = input(0, defval = 0, minval = 0, maxval = 1000, title = "take, %")
needct = input(false, defval = false, title = "Counter-trend entry")
len = input(20, defval = 20, minval = 2, maxval = 200, title = "Period")
needbb = input(true, defval = true, title = "Show Bands")
needbg = input(true, defval = true, title = "Show Background")
src = close
//PriceChannel 1
lasthigh = highest(src, len)
lastlow = lowest(src, len)
center = (lasthigh + lastlow) / 2
//Distance
dist = abs(src - center)
distsma = sma(dist, len)
hd = center + distsma
ld = center - distsma
hd1 = center + distsma / 2
ld1 = center - distsma / 2
//Trend
trend = close < ld and high < center ? -1 : close > hd and low > center ? 1 : trend[1]
//Lines
colo = needbb == false ? na : black
plot(hd, color = colo, linewidth = 1, transp = 0, title = "High band")
plot(center, color = colo, linewidth = 1, transp = 0, title = "center")
plot(ld, color = colo, linewidth = 1, transp = 0, title = "Low band")
//Background
col = needbg == false ? na : trend == 1 ? lime : red
bgcolor(col, transp = 80)
//Body
body = abs(close - open)
smabody = ema(body, 30)
candle = high - low
//Engulfing
min = min(open, close)
max = max(open, close)
bar = close > open ? 1 : close < open ? -1 : 0
upeng = bar == 1 and bar[1] == -1 and min >= min[1] and max <= max[1] ? 1 : 0
dneng = bar == -1 and bar[1] == 1 and min >= min[1] and max <= max[1] ? 1 : 0
//Signals
up7 = trend == 1 and ((bar == -1 and bar[1] == -1) or (body > smabody and close < open)) ? 1 : 0
dn7 = trend == 1 and bar == 1 and bar[1] == 1 and close > strategy.position_avg_price * (100 + takepercent) / 100 ? 1 : 0
up8 = trend == -1 and bar == -1 and bar[1] == -1 and close < strategy.position_avg_price * (100 - takepercent) / 100 ? 1 : 0
dn8 = trend == -1 and ((bar == 1 and bar[1] == 1) or (body > smabody and close > open)) ? 1 : 0
if up7 == 1 or up8 == 1
strategy.entry("Long", strategy.long, needlong == false ? 0 : trend == -1 and needct == false ? 0 : na)
if dn7 == 1 or dn8 == 1
strategy.entry("Short", strategy.short, needshort == false ? 0 : trend == 1 and needct == false ? 0 : na)