熊の力追跡戦略

作者: リン・ハーンチャオチャン,日付: 2024-01-12 11:43:08
タグ:

img

概要

Bear Power Tracking Strategyは,Alexander Elder博士のElder Ray指標をベースに設計され,市場における買取・販売圧力を測定する.市場合意値を示すために13日指数関数移動平均値 (EMA) を使用し,売り手の価格を合意値以下に押し込む能力を測定するために Bear Power指標を使用する.

戦略の論理

この戦略の核心指標は,13日間のEMAを1日の低価格から引いて計算されるベアパワーである.これは,売り手が平均合意値を下回る価格を押し出す能力を反映している.

Bear Power が指定された値を超えると,ロングポジションが開かれます.

さらに,Long/Shortの方向は"Reverse Trade"のブーランパラメータを通じて切り替えることもできます. Trueに設定されたときに信号を逆転させます.

戦略はシンプルで 実行も簡単で 方向性を判断する指標が1つあります

利点分析

この戦略の利点は以下の通りです.

  1. 一つの指標で理解し実行しやすい
  2. 異なる市場環境のための柔軟なパラメータ調整
  3. リバース・トレードは戦略の種類を豊かにする

リスク分析

リスクもあります:

  1. 誤った信号は,単一の指示で生成され得る.
  2. ストップ・ロスは大きな損失につながる可能性があります
  3. 不適切なパラメータは,過剰取引を引き起こす可能性があります

複数の指標で確認し ストップ損失とパラメータ調整をすることで 最適化できます

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

戦略を最適化するためのいくつかの方向性:

  1. MACD,KDJなどの他の指標をフィルター信号に追加
  2. 損失を制限するために移動ストップ損失を追加します.
  3. 入口と出口の指標パラメータを最適化する
  4. 基本分析 ストック選択
  5. 他の戦略と組み合わせる

概要

Bear Power Tracking Strategyは,インディケーターを限界値と比較してエントリーと出口を判断するシンプルなコンセプトを持っています.インディケーターベースの戦略として,インディケーター,ストップ損失,ストック選択などの側面で最適化するための大きな余地があります.


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

//@version = 2
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 07/12/2016
// Developed by Dr Alexander Elder, the Elder-ray indicator measures buying 
// and selling pressure in the market. The Elder-ray is often used as part 
// of the Triple Screen trading system but may also be used on its own.
// Dr Elder uses a 13-day exponential moving average (EMA) to indicate the 
// market consensus of value. Bear Power measures the ability of sellers to 
// drive prices below the consensus of value. Bear Power reflects the ability 
// of sellers to drive prices below the average consensus of value.
// Bull Power is calculated by subtracting the 13-day EMA from the day's High. 
// Bear power subtracts the 13-day EMA from the day's Low.
// You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
// 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="Elder Ray (Bear Power) Strategy Backtest")
Length = input(13, minval=1)
Trigger = input(0)
reverse = input(false, title="Trade reverse")
hline(0, color=purple, linestyle=line)
xPrice = close
xMA = ema(xPrice,Length)
DayLow = iff(dayofmonth != dayofmonth[1], low, min(low, nz(DayLow[1])))
nRes = DayLow - xMA
pos = iff(nRes > Trigger, 1,
	   iff(nRes < Trigger, -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(nRes, color=blue, title="Bear Power", style = histogram)


もっと