この戦略は,ストップ・ロズとストップ・ストップ・プライス・ポイントがしばしば整数価格または重要な価格レベルに設定されるという考えに基づいている.これらの価格ポイントは,しばしばサポートとレジスタンスとして機能する.戦略は,これらの重要な価格レベルを認識して,価格が接近する時に買い物または売却を行う.
この戦略は主に以下のルールを含んでいます.
クローズアップ価格がキー価格レベルより高く,過去10Kラインでこの価格に触れないとき,買取操作を行う.
その後,クライプトラッキングを使用して,価格がキー価格を突破した動きを追跡します. クライプステップの長さは20点です.
売却操作は,購入の反対で,閉盘価格が鍵値レベルより低く,過去10Kラインでこの価格に触れないとき,売却操作を行う.
重要な価格レベルを識別する方法は以下の通りです.
この戦略は,価格心理学の理念に基づいている.整数価格または重要なレベルは,多空の当事者が争う重要な位置であり,取引信号として効果を発揮する.同時に,クライプトラッキングは,価格突破後のトレンドを追跡することができます.
この戦略の利点は以下の通りです.
この戦略には以下のリスクもあります.
対応方法:
この戦略は以下の点で最適化できます.
取引量などの指標を組み合わせるなど,偽突破のリスクを避けるために,重要な価格点の重要性を判断する条件を追加する.
最適化パラメータ,特に重要な価格領域のステップ長さ,K線周期などのパラメータ.異なる品種の特性により適合させる.
固定クライミングストップの代わりにダイナミック・トラッキングストップを使用するなど,トラッキングストップのメカニズムを最適化する.
信号の質を向上させるために,重要な価格領域の強さや弱さを判断するために,歴史データを使用する機械学習アルゴリズムを追加します.
戦略を時間周期に拡張し,より高い時間周期でトレンドを判断し,より低い時間周期で追跡する.
この戦略は,価格のピークポイントをベースに考え,シンプルで直感的に,普遍的な取引習慣を利用して取引信号を形成する.戦略の機会は充実しているが,偽の突破を扱うためにさらなる最適化が必要である.パラメータ最適化や機械学習などの手段は,戦略の安定性を高める.この戦略は,日中のショートライン取引のための考えを提供することができ,また,周期を越えたトレンド追跡戦略にも拡張できます.
/*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)