逆転動的ピボットポイント 指数関数移動平均戦略

作者: リン・ハーンチャオチャン, 日付: 2023-12-08 11:37:36
タグ:

img

概要

逆転動的ピボットポイント指数関数移動平均戦略は,逆転取引と動的サポートレジスタンスレベルを組み合わせます.ストキャスティックオシレーターを使用して市場の逆転点を特定し,前日の高値,低値,閉値に基づいて日々のサポート/レジスタンスを計算します.逆転とピボットポイント戦略の両方が購入または売却信号を生成すると,長または短になります.この戦略は中期取引に適しています.

戦略の論理

逆転戦略

逆転戦略は,市場が過買いまたは過売りになると,価格が値範囲に戻る傾向があるという論理に基づいています.特に,この逆転戦略は,ウルフ・ジェンセンのルールに従います.

ロープは,2日連続で前回のロープよりも高かった場合と,9日間のスローK線が50を下回る場合;ショートは,2日連続で前回のロープよりも低かった場合と9日間のファストK線が50を超えるとします.

ダイナミックピボットポイント戦略

動的ピボットポイント戦略は,前日の高値,低値,閉値に基づいて,現在の日のサポートとレジスタンスレベルを計算します.公式は以下のとおりです.

ピボットポイント = (高 + 低 + 閉じる) / 3

サポート 1 =ピホットポイント - (ハイ -ピホットポイント)

抵抗1 =ピホットポイント+ (ピホットポイント - 低)

ストロークがサポート1より低くなるとショートになります

二重信号

この戦略は,逆転とダイナミックピボットポイント戦略を組み合わせます.両戦略からの信号が一致するときにのみポジションに入ります.これはいくつかの偽信号をフィルタリングし,安定性を向上させます.

利点

この戦略の最大の利点は,逆転戦略とダイナミックS/R戦略の両方の強みを組み合わせることである.主要なトレンド逆転から利益を得ることができ,主要なサポートとレジスタンスレベルも特定することができます.個々の戦略と比較して,いくつかの誤った信号をフィルタリングするより高い安定性があります.

また,戦略にはパラメータが少なく,実装や最適化も簡単です.

リスク

この戦略には次のリスクもあります

  • 逆転が失敗した - 逆転信号にもかかわらず,価格が過剰に伸び,トレンドを継続する可能性があります.

  • サポート/レジスタンスレベル違反 - 価格は計算されたS/Rレベルを突破し,誤った信号を生む可能性があります.

  • 二重信号は保守的で 走行が欠けている 双重信号メカニズムは 取引を過濾する

対策:

  • パラメータを調整して 逆転を確認する

  • ストップ・ロスを使って コントロールします

  • 貿易機会を増やすために規則を調整する.

増進 の 機会

この戦略は,次の分野において強化できる.

  1. 逆転を特定する際の敏感性を向上させるため,異なるストカスティックパラメータの組み合わせをテストする.

  2. 異なる移動平均値や長期指標をテストして,全体的な傾向をよりよく測ることができます.

  3. 市場構造を決定するための他の要素を追加します.例えば,量指標です.

  4. 双信号ルールを最適化して より多くの取引を捕まえます

  5. リスクを管理するためにストップロスを組み込む.

結論

逆転動的ピボットポイント指数関数移動平均戦略は,逆転取引と動的サポート抵抗分析の強みを組み合わせます.主要トレンドターニングポイントから利益を得ることができ,また主要なレベルに対して日中の方向性を測定することができます. 双信号メカニズムを使用することで,偽取引をフィルタリングするのに良好な安定性があります. 戦略は,パラメータをチューニングし,追加のフィルターをテストし,パフォーマンスを向上させることでさらに最適化することができます.


/*backtest
start: 2023-11-07 00:00:00
end: 2023-12-07 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 25/03/2020
// This is combo strategies for get a cumulative signal. 
//
// First strategy
// This System was created from the Book "How I Tripled My Money In The 
// Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
// The strategy buys at market, if close price is higher than the previous close 
// during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50. 
// The strategy sells at market, if close price is lower than the previous close price 
// during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
//
// Second strategy
// This Pivot points is calculated on the current day.
// Pivot points simply took the high, low, and closing price from the previous period and 
// divided by 3 to find the pivot. From this pivot, traders would then base their 
// calculations for three support, and three resistance levels. The calculation for the most 
// basic flavor of pivot points, known as ‘floor-trader pivots’, along with their support and 
// resistance levels.
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
Reversal123(Length, KSmoothing, DLength, Level) =>
    vFast = sma(stoch(close, high, low, Length), KSmoothing) 
    vSlow = sma(vFast, DLength)
    pos = 0.0
    pos := iff(close[2] < close[1] and close > close[1] and vFast < vSlow and vFast > Level, 1,
	         iff(close[2] > close[1] and close < close[1] and vFast > vSlow and vFast < Level, -1, nz(pos[1], 0))) 
	pos

DPP() =>
    pos = 0
    xHigh  = security(syminfo.tickerid,"D", high[1])
    xLow   = security(syminfo.tickerid,"D", low[1])
    xClose = security(syminfo.tickerid,"D", close[1])
    vPP = (xHigh+xLow+xClose) / 3
    vR1 = vPP+(vPP-xLow)
    vS1 = vPP-(xHigh - vPP)
    pos := iff(close > vR1, 1,
             iff(close < vS1, -1, nz(pos[1], 0))) 
    pos

strategy(title="Combo Backtest 123 Reversal & Dynamic Pivot Point", shorttitle="Combo", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posDPP = DPP()
pos = iff(posReversal123 == 1 and posDPP == 1 , 1,
	   iff(posReversal123 == -1 and posDPP == -1, -1, 0)) 
possig = iff(reverse and pos == 1, -1,
          iff(reverse and pos == -1 , 1, pos))	   
if (possig == 1) 
    strategy.entry("Long", strategy.long)
if (possig == -1)
    strategy.entry("Short", strategy.short)	 
if (possig == 0) 
    strategy.close_all()
barcolor(possig == -1 ? #b50404: possig == 1 ? #079605 : #0536b3 )

もっと