黄金比率 平均逆転トレンド トレーディング戦略

作者: リン・ハーンチャオチャン, 日付: 2023-12-07 11:03:20
タグ:

img

概要

ゴールデン比率平均逆転トレンドトレード戦略は,チャネル指標と移動平均を使用して,より強いトレンド方向を特定し,価格が一定の比率まで引き下がった後,トレンド方向のポジションを開く.この戦略は,より強いトレンド特性を有する市場に適しており,トレンド市場で良好なパフォーマンスを発揮することができます.

戦略の論理

この戦略の主な指標は,チャネル指標,移動平均値,リトルラインなどです.

  1. チャネル指標は,価格チャネルを特定するために,最高高値と最低低値から計算されます.
  2. 移動平均は,価格の全体的な傾向方向を決定するために使用されます.
  3. 引き戻しトリガーラインは,価格が特定の比率でチャネル境界から反転した後,ポジションを開きます.

価格がチャネルの底に触ると,戦略は最低点を基準点として記録し,セールシグナルを設定します.価格が上昇すると,上昇が引き戻し比に達すると,リバウンドポイントの周りにショートポジションが開かれます.

逆に,価格がチャネルの上位に達すると,戦略は最高点を基準点として記録し,購入信号を設定します.価格が下がると,引き下げ比率が要求される場合,その点の周りにロングポジションが開かれます.

したがって,この戦略の取引論理は,価格チャネルを追跡し,逆転信号が現れたときに既存のトレンドに介入することです.これは平均逆転トレンド取引戦略の一般的なルーチンに属します.

利点分析

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

  1. 強いトレンド市場では 良くなっています
  2. 引き戻し比パラメータによって取引への進出の積極性を調整できます.
  3. 合理的な引き上げ制御は,単一の取引損失を制限することができます.

特に,戦略は主にトレンド逆転点でポジションを開くため,価格変動が大きく,傾向がより明白な市場ではよりうまく機能します.また,プルバック比率パラメータを調整することで,トレンドに従う戦略の攻撃性のレベルを制御できます.最後に,ストップロスは単一のトレード損失を非常にうまく制御することができます.

リスク分析

この戦略の主なリスクには,以下も含まれます.

  1. この戦略は,取引手段の傾向特性に敏感です.
  2. 不適切な引き戻し比設定は,過度に攻撃的または過度に保守的になる可能性があります.
  3. ポジションを保持する時間が長すぎると 一夜間のリスクに注意を払う必要があります

特に,戦略で使用される取引手段が傾向が弱く変動が小さい場合,パフォーマンスが損なわれる可能性があります.また,過剰なまたは過小なプルバック比率は戦略のパフォーマンスに影響します.最後に,戦略のポジション保持時間が長くなる可能性があるため,一夜間のリスク管理にも注意が必要です.

上記のリスクを避けるために,次の側面を最適化することを検討してください.

  1. 傾向の特徴がはっきりした取引手段を選択する.
  2. 最適なパラメータの組み合わせを見つけるために 引き戻し比パラメータを調整します
  3. 保持時間を合理的に制御するために利益を取出を設定します.

結論

金比平均逆転傾向トレード戦略は,単純な指標を通じて価格動向と引き下げ信号を判断し,強い市場の動向を追跡するためにポジションを開き,典型的なトレンドシステムに属しています.この戦略は,大きなパラメータ調整スペースを持ち,最適化を通じてより多くの市場環境に適応することができ,リスク管理も合理的です.したがって,ライブ取引で検証し改善する価値のある戦略アイデアです.


/*backtest
start: 2022-11-30 00:00:00
end: 2023-12-06 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
//
// A port of the TradeStation EasyLanguage code for a mean-revision strategy described at
//     http://traders.com/Documentation/FEEDbk_docs/2017/01/TradersTips.html
//
// "In “Mean-Reversion Swing Trading,” which appeared in the December 2016 issue of STOCKS & COMMODITIES, author Ken Calhoun
//  describes a trading methodology where the trader attempts to enter an existing trend after there has been a pullback. 
//  He suggests looking for 50% pullbacks in strong trends and waiting for price to move back in the direction of the trend
//  before entering the trade."
//
//  See Also:
//    - 9 Mistakes Quants Make that Cause Backtests to Lie (https://blog.quantopian.com/9-mistakes-quants-make-that-cause-backtests-to-lie-by-tucker-balch-ph-d/)
//    - When Backtests Meet Reality (http://financial-hacker.com/Backtest.pdf)
//    - Why MT4 backtesting does not work (http://www.stevehopwoodforex.com/phpBB3/viewtopic.php?f=28&t=4020)
//
// 
// -----------------------------------------------------------------------------
// Copyright 2018 sherwind
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// The GNU General Public License can be found here
// <http://www.gnu.org/licenses/>.
//
// -----------------------------------------------------------------------------
//

strategy("Mean-Reversion Swing Trading Strategy v1", shorttitle="MRST Strategy v1", overlay=true)
channel_len  = input(defval=20, title="Channel Period", minval=1)
pullback_pct = input(defval=0.5, title="Percent Pull Back Trigger", minval=0.01, maxval=1, step=0.01)
trend_filter_len = input(defval=50, title="Trend MA Period", minval=1)


upper_band = highest(high, channel_len)
lower_band = lowest(low, channel_len)
trend      = sma(close, trend_filter_len)

low_ref  = 0.0
low_ref  :=  nz(low_ref[1])
high_ref = 0.0
high_ref := nz(high_ref[1])
long_ok  = false
long_ok  := nz(long_ok[1])
short_ok = false
short_ok := nz(short_ok[1])
long_ok2 = false
long_ok2  := nz(long_ok2[1])

if (low == lower_band)
    low_ref  := low
    long_ok  := false
    short_ok := true
    long_ok2 := false

if (high == upper_band)
    high_ref := high
    long_ok  := true
    short_ok := false
    long_ok2  := true

// Pull Back Level
trigger = long_ok2 ? high_ref - pullback_pct * (high_ref - low_ref) : low_ref + pullback_pct * (high_ref - low_ref)

plot(upper_band, title="Upper Band", color=long_ok2?green:red)
plot(lower_band, title="Lower Band", color=long_ok2?green:red)
plot(trigger, title="Trigger", color=purple)
plot(trend, title="Trend", color=orange)

enter_long = long_ok[1] and long_ok and crossover(close, trigger) and close > trend and strategy.position_size <= 0
enter_short = short_ok[1] and short_ok and crossunder(close, trigger) and close < trend and strategy.position_size >= 0

if (enter_long)
    long_ok := false
    strategy.entry("pullback-long", strategy.long, stop=close, comment="pullback-long")
else
    strategy.cancel("pullback-long")

if (enter_short)
	short_ok := false
    strategy.entry("pullback-short", strategy.short, stop=close, comment="pullback-short")
else
    strategy.cancel("pullback-short")

strategy.exit("exit-long", "pullback-long", limit=upper_band, stop=lower_band)
strategy.exit("exit-short", "pullback-short", limit=lower_band, stop=upper_band)


もっと