ダイナミックな価格チャネル取引戦略

作者: リン・ハーンチャオチャン, 日時: 2023-09-16 19:01:26
タグ:

概要

この記事では,ダイナミックな価格チャネルに基づく短期取引戦略を紹介しています. ダイナミックな価格チャネルとチャネルブレイクでの取引を計算することによって,トレンド方向を判断します.

戦略の論理

この戦略は次の論理に基づいています

  1. 最低価格と最高価格を用いて動的価格チャネルを計算する.上帯は最高価格とチャネルの真ん中の平均値である.下帯は最低価格と真ん中の差を引いた真ん中の値である.

  2. 価格が上位帯を超えると上昇傾向が始まり,価格が下位帯を超えると下位傾向が始まります.

  3. 上向きのトレンドでは,2つの連続した下向きのバーが現れるとロング.下向きのトレンドでは,2つの連続した上向きのバーが現れるとショート.

  4. 逆トレンドのエントリを考慮して 市場の勢いを追いかける.例えば,上昇傾向ではショート,下落傾向ではロング.

  5. 入場価格のx%のような利益率を設定します.

利点分析

この戦略の利点は以下の通りです.

  1. ダイナミックチャネルは,よりよいトレンド判断のために,リアルタイムで市場の変化を反映します.

  2. トレンドとブレイクを組み合わせると 偽ブレイクをフィルターします

  3. 逆トレンドのエントリは 市場勢力を活用して 過剰な収益を上げます

  4. 利得停止はリスクを効果的に制御します

  5. 論理はシンプルで 実行が簡単です

リスク分析

考慮すべきリスクもいくつかあります.

  1. 変動する市場ではチャネルが故障する可能性があります. 安定性のためにパラメータを調整します.

  2. 逆トレンドの取引は損失に脆弱です 損失の大きさをコントロールします

  3. 偽のブレイクが悪い取引を 引き起こします

  4. コストをコントロールするために過剰な取引を避ける.

結論

この戦略は,ダイナミックなチャネル,ブレイクアウト,そして利益を取ることを統合する.適切な調整によって,それは効果的な短期的な取引ツールになることができます.しかし,トレーダーはリスク管理を注意し,自分のスタイルに合わせてそれを調整する必要があります.


/*backtest
start: 2022-09-09 00:00:00
end: 2023-09-15 00:00:00
period: 2d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/


//@version=2
strategy("Noro's Bands Scalper Strategy v1.1", shorttitle = "Scalper str 1.1", 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
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
hd2 = center + distsma * 2
ld2 = center - distsma * 2

//Trend
sma = sma(close, 20)
smatrend = close > sma ? 1 : close < sma ? -1 : smatrend[1]
trend = close < ld and high < hd ? -1 : close > hd and low > ld ? 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)

//Signals
bar = close > open ? 1 : close < open ? -1 : 0
up7 = trend == 1 and bar == -1 and bar[1] == -1 ? 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 ? 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)

もっと