ビル・ウィリアムズ 素晴らしいオシレーター取引戦略

作者: リン・ハーンチャオチャン開催日:2023年12月19日 15:27:15
タグ:

img

概要

ビル・ウィリアムズ Awesome Oscillator 取引戦略は,ビル・ウィリアムズが著書"New Trading Dimensions"で提案した推薦に基づいて開発された定量的な取引戦略である.この戦略は,オシレーター指標を構築するために,高速移動平均値と緩やかな移動平均値の違いを使用し,ヒストグラムの色変化を通じて取引信号を生成し,ヒストグラムとして表示する.

戦略の論理

この戦略のコア指標は Awesome Oscillator (AO) です.その公式は:

AO = SMA (平均価格,速い長さ) - SMA (平均価格,遅い長さ)

中間価格は高値と低値の平均値です. 急速値は速い移動平均値の期間を表します. 遅い値は遅い移動平均値の期間を表します.

AO指標は,高速移動平均値と遅い移動平均値の違いを通じて,異なる時間スケールで市場の価格の振動を反映する.高速移動平均値が遅い移動平均値よりも高くなった場合,短期間の価格勢力が長期間の価格勢力のより強いことを示し,購入信号を与える.高速移動平均値が遅い価格勢力のより低い場合,短期間の価格勢力が長期間の価格勢力のより弱いことを示し,販売信号を与える.

この戦略は,現在の AO 値と前の期間の違いを使用して,現在の期間のlong/short スタンドを決定します.ヒストグラムでそれらを識別するために,異なる色が使用されます.現在の AO が前の期間に比べて大きい場合,青色が表示されます.現在の AO が前の期間に比べて小さい場合,赤色が表示されます.

利点分析

この戦略の主な利点は以下の通りである.

  1. 移動平均値の差を指標の構築に使うことで,価格データは平らになり,市場の騒音をフィルターするのに役立ちます.
  2. 急速移動平均値と遅移動平均値の差は,異なる時間軸における価格動向の変化を記録します.
  3. ヒストグラムは,取引方向を判断しやすくするために,ロング/ショート状態を視覚的に表示します.
  4. 調整可能なパラメータ,異なる取引手段に対応する指標の感度調整.

リスク分析

この戦略にはいくつかのリスクもあります:

  1. パラメータの設定が正しくない場合,頻繁に取引信号が発信され,過剰取引が起こる可能性があります.
  2. AO指標の比較的複雑な構造は,パラメータが正しく設定されていない場合,取引機会を逃す可能性があります.
  3. シグナルは1つの情報源から来ていて 他の指標から確認されていない.

上記のリスクを軽減するために,パラメータを最適化し,指標構造を調整し,他の指標を検証に使用することができます.

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

この戦略を最適化できる方向性の中には,

  1. 最適なパラメータの組み合わせを見つけるために,高速と遅い移動平均の長さを最適化する.
  2. AO指標を構成するために,EMA,LWMAなど,異なる種類の移動平均を試す.
  3. AO を改善するために,トレンドフォローと振動指標を組み込む.
  4. ストップ・ロスのメカニズムを追加して,取引ごとに損失を制御します.

結論

結論として,Bill Williams Awesome Oscillatorのトレード戦略は,高速・スロー・ムービング・平均値の違いを用いて価格動向の変化を判断することによって,短期間の逆転機会を効果的に特定する.この戦略は明確な概念を持ち,実行が簡単です.パラメータ最適化と他の指標の組み込みにより,良いトレードパフォーマンスを達成する可能性があります.


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

//@version=2
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 29/12/2016
//    This indicator is based on Bill Williams` recommendations from his book 
//    "New Trading Dimensions". We recommend this book to you as most useful reading.
//    The wisdom, technical expertise, and skillful teaching style of Williams make 
//    it a truly revolutionary-level source. A must-have new book for stock and 
//    commodity traders.
//    The 1st 2 chapters are somewhat of ramble where the author describes the 
//    "metaphysics" of trading. Still some good ideas are offered. The book references 
//    chaos theory, and leaves it up to the reader to believe whether "supercomputers" 
//    were used in formulating the various trading methods (the author wants to come across 
//    as an applied mathemetician, but he sure looks like a stock trader). There isn't any 
//    obvious connection with Chaos Theory - despite of the weak link between the title and 
//    content, the trading methodologies do work. Most readers think the author's systems to 
//    be a perfect filter and trigger for a short term trading system. He states a goal of 
//    10%/month, but when these filters & axioms are correctly combined with a good momentum 
//    system, much more is a probable result.
//    There's better written & more informative books out there for less money, but this author 
//    does have the "Holy Grail" of stock trading. A set of filters, axioms, and methods which are 
//    the "missing link" for any trading system which is based upon conventional indicators.
//    This indicator plots the oscillator as a histogram where periods fit for buying are marked 
//    as blue, and periods fit for selling as red. If the current value of AC (Awesome Oscillator) 
//    is over the previous, the period is deemed fit for buying and the indicator is marked blue. 
//    If the AC values is not over the previous, the period is deemed fir for selling and the indicator 
//    is marked red.
//
// 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("Bill Williams. Awesome Oscillator (AO)")
nLengthSlow = input(34, minval=1, title="Length Slow")
nLengthFast = input(5, minval=1, title="Length Fast")
reverse = input(false, title="Trade reverse")
xSMA1_hl2 = sma(hl2, nLengthFast)
xSMA2_hl2 = sma(hl2, nLengthSlow)
xSMA1_SMA2 = xSMA1_hl2 - xSMA2_hl2
cClr = xSMA1_SMA2 > xSMA1_SMA2[1] ? blue : red
pos = iff(xSMA1_SMA2 > xSMA1_SMA2[1], 1,
	   iff(xSMA1_SMA2 < xSMA1_SMA2[1], -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(xSMA1_SMA2, style=histogram, linewidth=1, color=cClr)

もっと