トレンド・トレード・ストラテジーは,価格・エクストリームに基づいている.

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

img

概要

この戦略は,上位および下位帯を形成するために,一定の期間における最大値と最小値点を計算する.現在の価格が上位または下位帯を突破すると,ロングまたはショートポジションが取られる.この戦略は主に傾向が強まるときに価格の傾向と取引を判断する.

戦略の論理

この戦略の主な指標は,一定期間における最大値と最低値の計算である.

上部帯:最大高点を見つけるために,左から右までの段落のK線をスキャンし,左から最左の1番目のK線と右から最右の1番目のK線の両方がこの最大高点よりも低いかどうかを決定します.そうであれば,この点は範囲の上部として確認されます.

下帯:最小低点を見つけるために,左から右に周期中のK線をスキャンし,左から最左の1番目のK線と右から最右の1番目のK線の両方がこの最小低点よりも高いかどうかを決定します.そうであれば,この点は範囲の底として確認されます.

この計算を繰り返すことで,一期間の上位および下位価格帯を得ることができます.価格が上位帯を突破するとロングポジションを取り,価格が下位帯を突破するとショートポジションを取ります.これは価格極点によってトレンドを決定するトレンド取引戦略を形成します.

利点分析

この戦略はトレンドを判断する方法は,価格極点を通じてトレンドの強化部分を決定することで,非常にシンプルで,統合シナリオを効果的にフィルタリングし,統合で取引を避けることができます. 戦略の信号生成ポジションには利点があり,容易にトレンド追跡を形成することができます. さらに,戦略は比較的厳格な方法でシグナルを取っており,誤ったシグナルを減らすことができます.

リスク分析

この戦略は,信号をかなり厳格に取り扱うため,より多くの取引機会を逃す可能性があります. さらに,極点が蓄積し形成するのに時間がかかりますが,比較的遅くなるでしょう.パラメータは適切な最適化が必要です.パラメータが不適切であれば,誤った信号も発生する可能性が高いです.

エクストリームポイントの判断の厳しさは,誤った判断のリスクを軽減するためにいくつかの変動を許すために,適度に低下させることができます.また,誤った信号を避けるために,他の指標で確認することができます.

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

上部と下部帯を決定するサイクルを適切に最適化して傾向をより良く把握することができる.さらに,極点を判断するためのスキャン範囲も調整できる.

取引機会を逃す可能性を減らすため,極限点を決定するための条件は,一定の変動を許すため,適度に緩和することができる.

単一指標判断による誤った信号のリスクを避けるために,容量指標,移動平均等などの他の指標で確認を試みることができる.

結論

この戦略は,価格極点によってトレンド特性を判断する方法は,かなり直接的で効果的です. 効率的に統合をフィルタリングし,トレンド取引のためのトレンドの強化時間を決定することができます. この戦略の利点はトレンドを追いかけるための良い信号生成位置にあります. 欠点は,信号が一定の遅れがあり,ターンを捕捉することは困難です. パラメータと条件の最適化によって,この戦略は比較的信頼できるトレンド判断ツールになることができます.


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

//@version=2
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 19/02/2018
//  Stock market moves in a highly chaotic way, but at a larger scale, the movements 
// follow a certain pattern that can be applied to shorter or longer periods of time 
// and we can use Fractal Chaos Bands Indicator to identify those patterns. Basically, 
// the Fractal Chaos Bands Indicator helps us to identify whether the stock market is 
// trending or not. When a market is trending, the bands will have a slope and if market 
// is not trending the bands will flatten out. As the slope of the bands decreases, it 
// signifies that the market is choppy, insecure and variable. As the graph becomes more 
// and more abrupt, be it going up or down, the significance is that the market becomes 
// trendy, or stable. Fractal Chaos Bands Indicator is used similarly to other bands-indicator 
// (Bollinger bands for instance), offering trading opportunities when price moves above or 
// under the fractal lines.
//
// The FCB indicator looks back in time depending on the number of time periods trader selected 
// to plot the indicator. The upper fractal line is made by plotting stock price highs and the 
// lower fractal line is made by plotting stock price lows. Essentially, the Fractal Chaos Bands 
// show an overall panorama of the price movement, as they filter out the insignificant fluctuations 
// of the stock price.
//
// You can change long to short in the Input Settings
// WARNING:
//  - For purpose educate only
//  - This script to change bars colors.
////////////////////////////////////////////////////////////
fractalUp(pattern) =>
    p = high[pattern+1]
    okl = 1
    okr = 1
	for i = pattern to 1
		okl := iff(high[i] < high[i+1] and okl == 1 , 1, 0)
	for i = pattern+2 to pattern*2+1
		okr := iff(high[i] < high[i-1] and okr == 1, 1, 0)
	res = iff(okl == 1 and okr == 1, p, res[1])
    res

fractalDn(pattern) =>
    p = low[pattern+1]
    okl = 1
    okr = 1
	for i = pattern to 1
		okl := iff(low[i] > low[i+1] and okl == 1 , 1, 0)
	for i = pattern+2 to pattern*2+1
		okr := iff(low[i] > low[i-1] and okr == 1, 1, 0)
	res = iff(okl == 1 and okr == 1, p, res[1])
    res

strategy(title="Fractal Chaos Bands", overlay = true)
Pattern = input(1, minval=1)
reverse = input(false, title="Trade reverse")
xUpper = fractalUp(Pattern)
xLower = fractalDn(Pattern)
pos = iff(close > xUpper, 1,
       iff(close < xLower, -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(xUpper, color=red, title="FCBUp")
plot(xLower, color=green, title="FCBDn")

もっと