この戦略は,価格逆転を特定するために複数の技術指標を組み合わせ,多因子駆動の逆転取引戦略となっています. 123パターンをポラライズドフラクタル効率 (PFE) 指標と統合し,偽信号をフィルタリングし,勝利率を改善するために両者が合意したときにのみ取引を行います.
戦略は2つの主要要素から構成されています.
123 パターン識別: 閉店が2日連続で上回り,3日目にはダウンし,ストカスティック・ファストラインがスローラインを下回ると買い信号が生成される.逆のことが起こると売り信号が生成される.
PFE指標の限界:上限を超えるPFEは売り信号を示し,下限以下のPFEは買い信号を示します.
取引は123パターンとPFEインジケーターの両方が一致する場合にのみ行われます.そうでなければ,ポジションはフラットになります.
123パターンは潜在的な逆転を特定する.PFEは,誤ったブレイクを避けるためにトレンド効率を測定する.彼らは多因子確認を通じて精度を向上させる.
緩和策
戦略は以下を通じて強化できます.
この戦略は,逆転点を特定するために複数の要因を組み合わせ,理論的健全性と実装の容易さを提供する.マルチファクタルのアプローチは単一の指標よりも精度を向上させる.パラメータ最適化,ストップ損失管理,ポートフォリオ組み合わせなどによりさらなる改善がもたらされる.
/*backtest start: 2023-09-11 00:00:00 end: 2023-09-13 08:00:00 period: 1m basePeriod: 1m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=4 //////////////////////////////////////////////////////////// // Copyright by HPotter v1.0 16/04/2021 // 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 // The Polarized Fractal Efficiency (PFE) indicator measures the efficiency // of price movements by drawing on concepts from fractal geometry and chaos // theory. The more linear and efficient the price movement, the shorter the // distance the prices must travel between two points and thus the more efficient // the price movement. // // 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 PFE(Length,LengthEMA,BuyBand,SellBand) => pos = 0.0 PFE = sqrt(pow(close - close[Length], 2) + 100) C2C = sum(sqrt(pow((close - close[1]), 2) + 1), Length) xFracEff = iff(close - close[Length] > 0, round((PFE / C2C) * 100) , round(-(PFE / C2C) * 100)) xEMA = ema(xFracEff, LengthEMA) pos := iff(xEMA < SellBand, -1, iff(xEMA > BuyBand, 1, nz(pos[1], 0))) pos strategy(title="Combo Backtest 123 Reversal & PFE (Polarized Fractal Efficiency)", shorttitle="Combo", overlay = true) line1 = input(true, "---- 123 Reversal ----") Length = input(14, minval=1) KSmoothing = input(1, minval=1) DLength = input(3, minval=1) Level = input(50, minval=1) //------------------------- line2 = input(true, "---- PFE ----") LengthPFE = input(9, minval=1) LengthEMA = input(5, minval=1) BuyBand = input(50, step = 0.1) SellBand = input(-50, step = 0.1) reverse = input(false, title="Trade reverse") posReversal123 = Reversal123(Length, KSmoothing, DLength, Level) posPFE = PFE(LengthPFE,LengthEMA,BuyBand,SellBand) pos = iff(posReversal123 == 1 and posPFE == 1 , 1, iff(posReversal123 == -1 and posPFE == -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 )