この戦略は平均線変換-散布指標 ((CMO)) による取引判断を行う.CMO絶対値は価格散布の程度を表し,戦略はCMOの3周期絶対値の平均値で超買超売を判断し,典型的な震動指標取引戦略に属している.
この戦略は主に以下の論理を適用します.
CMO指数は,価格変化の動力を反映する.その絶対値の大きさは,価格の散乱度を表し,一定の幅を超えると,超買超売領域に入る.この戦略は,CMOのこの特性を利用し,多周期平均値を曲線を平らにするために使用し,超買超売状況を判断し,典型的な震動取引戦略に属している.
どう対処するか?
この戦略は以下の側面から拡張できます.
この戦略は,CMOが超買超売を判断して反転取引を行うために利用し,多周期平均を採用したため,曲線を効果的に平らげ,誤信号を避けることができる.CMO指数は,その理論的基盤が安定し,価格の分散状態を信頼して判断することができる.パラメータ最適化,止損戦略などの拡張により,より安定した震動指数取引戦略に最適化することができる.
/*backtest
start: 2023-09-11 00:00:00
end: 2023-09-14 07:00:00
period: 30m
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
////////////////////////////////////////////////7////////////
// Copyright by HPotter v1.0 21/02/2017
// This indicator plots the absolute value of CMO averaged over three
// different lengths. This indicator plots a classical-looking oscillator,
// which is really an averaged value based on three different periods.
//
// 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="CMOabsav", shorttitle="CMOabsav")
Length1 = input(5, minval=1)
Length2 = input(10, minval=1)
Length3 = input(20, minval=1)
TopBand = input(58, minval=1)
LowBand = input(5, minval=0)
reverse = input(false, title="Trade reverse")
hline(0, color=green, linestyle=hline.style_dashed)
hline(TopBand, color=purple, linestyle=hline.style_solid)
hline(LowBand, color=red, linestyle=hline.style_solid)
xMom = close - close[1]
xMomabs = abs(close - close[1])
nSum1 = sum(xMom, Length1)
nSumAbs1 = sum(xMomabs, Length1)
nSum2 = sum(xMom, Length2)
nSumAbs2 = sum(xMomabs, Length2)
nSum3 = sum(xMom, Length3)
nSumAbs3 = sum(xMomabs, Length3)
nRes = abs(100 * (nSum1 / nSumAbs1 + nSum2 / nSumAbs2 + nSum3 / nSumAbs3 ) / 3)
pos = iff(nRes > TopBand, 1,
iff(nRes < LowBand, -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="CMOabsav")