オシレーター指数変換戦略

作者: リン・ハーンチャオチャン開催日:2023年12月22日 14:21:28
タグ:

img

概要

オスイレーターインデックス変換戦略は,トレードシグナルを生成するために,ブレスレットの3-10オスイレーターインデックスと16日間の単純な移動平均のクロスオーバーを利用する.日中および一夜間取引に適しています.

戦略の論理

この戦略は,ブレスレットの3-10オシレーター指数に基づいており,これは3日間と10日間の指数関数移動平均値の差である.高速線 (3-10オシレーター) がスローライン (16日間のSMA) の上を横切ったときに長行し,高速線がスローラインを下を横切ったときに短行する.

この戦略は,まず3日間のEMAと10日間のEMAとそれらの差をオシレーターインデックスとして計算する.その後,オシレーターインデックスの16日間の単純な移動平均をシグナルラインとして計算する.オシレーターインデックスはシグナルラインの上を横切るとロングになり,下を横切るとショートする.逆転取引は許容される.

利点を分析する

  1. これは非常に効果的です.
  2. 快速・遅い線交差で明確な取引信号を形成する
  3. 逆転取引が異なる市場体制に適応できるようにする
  4. 日中の取引と一夜間の取引の両方で使用できます.

リスク分析

  1. ブレスレット振動器のパフォーマンスは不安定で,利益/損失の変動
  2. 速い線と遅い線が交差すると 偽信号が生じる可能性があります
  3. リバース取引はリスクが高く,慎重に使用されるべきです
  4. ストップ・ロスは日中取引とオブナイト取引のポジションサイズ要求

オプティマイゼーションの方向性

  1. 移動平均期間の調整によってパラメータを最適化
  2. 他の指標または価格アクションを使用してフィルターを追加する
  3. 単一の取引損失の大きさを制限するためにストップ損失戦略を追加します.
  4. 資本管理を最適化し,総引き上げ効果を削減する

結論

オシレーター指数変換戦略は,3-10のオシレーターとシグナルラインクロスオーバーからシグナルを生成する短期間の取引戦略である.日中および一夜間の使用の両方にとってシンプルで実用的であるが,PnL変動と偽信号リスクが固有である.戦略を精製するために追加のフィルター,ストップ損失,ポジションサイズが必要である.適切な最適化により,一貫したアルファを達成することができる.


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

//@version=2
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 27/03/2017
// TradeStation does not allow the user to make a Multi Data Chart with 
// a Tick Bar Chart and any other type a chart. This indicator allows the 
// user to plot a daily 3-10 Oscillator on a Tick Bar Chart or any intraday interval.
// Walter Bressert's 3-10 Oscillator is a detrending oscillator derived 
// from subtracting a 10 day moving average from a 3 day moving average. 
// The second plot is an 16 day simple moving average of the 3-10 Oscillator. 
// The 16 period moving average is the slow line and the 3/10 oscillator is 
// the fast line.
// For more information on the 3-10 Oscillator see Walter Bressert's book 
// "The Power of Oscillator/Cycle Combinations" 
//
// You can change long to short in the Input Settings
// Please, use it only for learning or paper trading. Do not for real trading.
////////////////////////////////////////////////////////////
strategy(title="D_Three Ten Osc", shorttitle="D_Three Ten Osc")
Length1 = input(3, minval=1)
Length2 = input(10, minval=1)
Length3 = input(16, minval=1)
reverse = input(false, title="Trade reverse")
hline(0, color=green, linestyle=line)
xPrice =  request.security(syminfo.tickerid,"D", hl2)
xfastMA = ema(xPrice, Length1)
xslowMA = ema(xPrice, Length2)
xMACD = xfastMA - xslowMA
xSignal = sma(xMACD, Length3)
pos = iff(xSignal > xMACD, -1,
	     iff(xSignal < xMACD, 1, nz(pos[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)	   	    
barcolor(possig == -1 ? red: possig == 1 ? green : blue )
plot(request.security(syminfo.tickerid, "D", xMACD), color=blue, title="D_Three Ten Osc")
plot(request.security(syminfo.tickerid, "D", xSignal), color=red, title="D_Three Ave")

もっと