主要な価格ポイントに基づく追跡戦略


作成日: 2023-09-21 15:24:53 最終変更日: 2023-09-21 15:24:53
コピー: 0 クリック数: 684
1
フォロー
1617
フォロワー

概要

この戦略は,ストップ・ロズとストップ・ストップ・プライス・ポイントがしばしば整数価格または重要な価格レベルに設定されるという考えに基づいている.これらの価格ポイントは,しばしばサポートとレジスタンスとして機能する.戦略は,これらの重要な価格レベルを認識して,価格が接近する時に買い物または売却を行う.

戦略原則

この戦略は主に以下のルールを含んでいます.

  1. クローズアップ価格がキー価格レベルより高く,過去10Kラインでこの価格に触れないとき,買取操作を行う.

  2. その後,クライプトラッキングを使用して,価格がキー価格を突破した動きを追跡します. クライプステップの長さは20点です.

  3. 売却操作は,購入の反対で,閉盘価格が鍵値レベルより低く,過去10Kラインでこの価格に触れないとき,売却操作を行う.

  4. 重要な価格レベルを識別する方法は以下の通りです.

    • 閉店価格を整数に変換します.
    • 50整点 ((配置可能な) の余数と計算する
    • 余剰値が 25 よりも大きい場合は,最も近い 50 の整数点をキー価格として取ります.
    • 価格が変わらなければ

この戦略は,価格心理学の理念に基づいている.整数価格または重要なレベルは,多空の当事者が争う重要な位置であり,取引信号として効果を発揮する.同時に,クライプトラッキングは,価格突破後のトレンドを追跡することができます.

戦略的優位性

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

  1. 簡単な直感的な取引シグナルと入場ルール
  2. 特定の品種に依存せずに,この一般的な法則を利用する.
  3. ストップトラッキングはトレンドに沿って利益を固定します.

戦略リスク

この戦略には以下のリスクもあります.

  1. 重要な価格点は必ずしも強いサポートやレジスタンスである必要はありません. 偽の突破は取引の失敗につながる可能性があります.
  2. 固定された10K線判定規則は,異なる品種には適さないかもしれない。
  3. 追跡停止距離が大きすぎないこと,そうでなければ早すぎる停止が起こりうる.

対応方法:

  1. 価格の決定的なポイントを判断する指標の強さと弱さ.
  2. 異なる品種のパラメータを最適化して,最適なパラメータの組み合わせを探します.
  3. ストップ・ロスを追跡するパラメータを最適化して,市場に近いものにします.

戦略最適化の方向性

この戦略は以下の点で最適化できます.

  1. 取引量などの指標を組み合わせるなど,偽突破のリスクを避けるために,重要な価格点の重要性を判断する条件を追加する.

  2. 最適化パラメータ,特に重要な価格領域のステップ長さ,K線周期などのパラメータ.異なる品種の特性により適合させる.

  3. 固定クライミングストップの代わりにダイナミック・トラッキングストップを使用するなど,トラッキングストップのメカニズムを最適化する.

  4. 信号の質を向上させるために,重要な価格領域の強さや弱さを判断するために,歴史データを使用する機械学習アルゴリズムを追加します.

  5. 戦略を時間周期に拡張し,より高い時間周期でトレンドを判断し,より低い時間周期で追跡する.

要約する

この戦略は,価格のピークポイントをベースに考え,シンプルで直感的に,普遍的な取引習慣を利用して取引信号を形成する.戦略の機会は充実しているが,偽の突破を扱うためにさらなる最適化が必要である.パラメータ最適化や機械学習などの手段は,戦略の安定性を高める.この戦略は,日中のショートライン取引のための考えを提供することができ,また,周期を越えたトレンド追跡戦略にも拡張できます.

ストラテジーソースコード
/*backtest
start: 2022-09-14 00:00:00
end: 2023-09-20 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
//Strategy based on the idea that stop loss and take profit are often placed at full price levels or round numbers, whcih acts as resistance and supports levels
//Buy Rules:
//Actual price (close) is above round number.
//Round number level was not touched in previous ten bars (arbitrary value).
//Place a buy and follow the order with a trail step because price can bounce at round number (support) or can go through it.
//Sell Rules are the same of buy rules but inverted.
//
//Need improvement on conditions' logic and round numbers definitions


strategy("dP magnet", overlay=true, pyramiding=0,default_qty_type=strategy.percent_of_equity,default_qty_value=100,currency=currency.USD)

//Round Levels credit to RKchartest

roundLevel50 = input(500, 'Round Level 1, pips')
//roundLevel100 = input(1000, 'Round Level 2, pips')
deviation = input(1000, 'Max distance, pips', minval=0) 

rDelimeter = 1/syminfo.mintick

intRoundLevel = close[1] * rDelimeter

intRemainder = intRoundLevel % roundLevel50 
toRound = (intRemainder >= roundLevel50/2) ? roundLevel50 : 0
roundLevel = (intRoundLevel - intRemainder + toRound) / rDelimeter
plot(roundLevel, title='Round Level 1', color=black, style=line, transp=0, linewidth=1, trackprice=false)

//intRemainder2 = intRoundLevel % roundLevel100
//toRound2 = (intRemainder2 >= roundLevel100/2) ? roundLevel100 : 0
//roundLevel2 = (intRoundLevel - intRemainder2 + toRound2) / rDelimeter
//plot((abs(roundLevel2 - close) * rDelimeter < deviation) ? roundLevel2 : na, title='Round Level 2', color=black, style=circles, transp=0, linewidth=1, trackprice=true)

// end

//Start of strategy

distToFullNumber=(close-roundLevel) //can be positive or negative number

distPips=input(100,'Distance in pips to full level',minval=10) //user defined: this distance defines when to open an order at market price


TrailS=input(20,'Trail Step points',minval=10) //trail step that follows the order

longCondition = iff(distToFullNumber>0 and abs(distToFullNumber)<=distPips and lowest(low,10)>roundLevel,true,false)

if (longCondition)
    strategy.entry("LongMagnet", strategy.long)
    strategy.exit("ExitMagnet","LongMagnet",trail_points=TrailS)

shortCondition = iff(distToFullNumber<0 and abs(distToFullNumber)<=distPips and highest(high,10)<roundLevel,true,false)

if (shortCondition)
    strategy.entry("ShortMagnet", strategy.short)
    strategy.exit("Exit_Magnet","ShortMagnet",trail_points=TrailS)