
この戦略は,Ichimoku Kinko Hyo Strategy,すなわち一目均線システム戦略である. これは,一目均線に基づいて,他の技術指標と組み合わせたBTC取引戦略である.
この戦略は,多種多様な技術指標を統合したトレンド取引戦略システムである”目目均線システム”に基づいています.主に以下の指標が含まれています.
基準線 ((Kijun Sen):市場トレンドの方向を表し,過去26日間の高点と低点の中間点であり,サポートとレジスタンスラインとして使用できます.
変換線 ((Tenkan Sen): 株価の動態を表し,過去9日間の高点と低点のミッドポイントで,買入や売却のタイミングを判断するために使用できます.
未来SPAN A:一目平均線を代表する中間線は,基準線と変換線の平均値であり,一目平均線の警戒線として用いられる。
未来SPAN B: 長期トレンドラインを表し,過去52日の中点で,長期短期トレンドを判断する雲図を構成する.
この戦略は,RSI指標と結合して,超買い超売り領域で取引シグナルを発信する.
閉店価格が基準線を突破し,雲図の上にあるとき,買いのシグナルを生成する.閉店価格が基準線を下回り,雲図の下にあるとき,売りのシグナルを生成する.
一目平均線システムはトレンドを正確に判断し,勝率が高い
複数の指標を組み合わせて 機会を逃さないようにする
RSIは反転点を判断するのに有効です.
クラウドグラフは,長期短期トレンドを直感的に示しています.
平均線は遅れているので,他の指標と連携する必要があります.
トレンドマーケットの効果は良好だが,震動市場は一般的だ.
RSIパラメータの設定は,市場によって調整する必要があります
クラウドマップは複雑で,熟練した操作が必要です.
一見平均線パラメータを調整したり,より多くの技術指標を組み合わせて最適化することもできます.
平均線のパラメータを最適化して,トレンドの判断を速める
移動平均などの指標を追加し,信号の正確性を向上させる.
RSIのパラメータ設定は,市場によって調整されます.
リスク管理のための減損策の導入を検討する
この戦略は,一目平均線,RSIなどの複数の指標の判断傾向を総合的に使用し,上昇傾向を判断する際に高い正確性を持っています.しかし,一目平均線システムは遅滞しており,振動を判断することができません.これは,この戦略の主なリスクです.パラメータの最適化設定,または他の指標の追加により,この欠陥を補うことができ,戦略をより安定して信頼できます.
/*backtest
start: 2022-12-13 00:00:00
end: 2023-12-19 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=3
strategy("My Ichimoku Strat v2", overlay=true,default_qty_type=strategy.fixed, default_qty_value=1, initial_capital=1000, currency=currency.EUR,commission_type=strategy.commission.percent,commission_value=0.05)
// === BACKTEST RANGE ===
FromMonth = input(defval = 3, title = "From Month", minval = 1)
FromDay = input(defval = 1, title = "From Day", minval = 1)
FromYear = input(defval = 2018, title = "From Year", minval = 2014)
ToMonth = input(defval = 1, title = "To Month", minval = 1)
ToDay = input(defval = 1, title = "To Day", minval = 1)
ToYear = input(defval = 9999, title = "To Year", minval = 2014)
// === SERIES SETUP ===
//**** Inputs *******
KijunSenLag = input(6,title="KijunSen Lag",minval=1)
//Kijun-sen
//Support resistance line, buy signal when price crosses it
KijunSen = sma((high+low)/2,26)
buy2 = crossover(close,KijunSen) and (rising(KijunSen,KijunSenLag) or falling(KijunSen,KijunSenLag))
sell2= crossunder(close,KijunSen) and (rising(KijunSen,KijunSenLag) or falling(KijunSen,KijunSenLag))
//Tenkan-Sen
TenkanSen = sma((high+low)/2,9)
//Senkou Span A
SenkouSpanA = (KijunSen + TenkanSen)/2
//Senkou Span B
SenkouSpanB = sma((high+low)/2,52)
//Cloud conditions : ignore buy if price is under the cloud
// Huge cloud means safe support and resistance. Little cloud means danger.
buy3 = close > SenkouSpanA and close > SenkouSpanB
sell3 = close < SenkouSpanA and close < SenkouSpanB
//Chikou Span
//Buy signal : crossover(ChikouSpan,close)
//Sell Signal : crossunder(ChikouSpan,close)
ChikouSpan = close
buy1=crossover(ChikouSpan,close[26])
sell1=crossunder(ChikouSpan,close[26])
plotshape(buy1,style=shape.diamond,color=lime,size=size.small)
plotshape(sell1,style=shape.diamond,color=orange,size=size.small)
//Alerts
buyCompteur = -1
buyCompteur := nz(buyCompteur[1],-1)
buyCompteur := buy2 or buy3 ? 1 : buyCompteur
buyCompteur := buyCompteur > 0 ? buyCompteur + 1 : buyCompteur
buyCompteur := sell2 or sell3 ? -1 : buyCompteur
sellCompteur = -1
sellCompteur := nz(sellCompteur[1],-1)
sellCompteur := sell2 or sell3 ? 1 : sellCompteur
sellCompteur := sellCompteur > 0 ? sellCompteur + 1 : sellCompteur
sellCompteur := buy2 or buy3 ? -1 : sellCompteur
//RSI
src = close, len = input(14, minval=1, title="RSI Length")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
buyRSI = crossover(rsi,40) and close > TenkanSen and rsi[5]<30 and (rsi-rsi[1])>5
sellRSI = crossunder(rsi,60) and close < TenkanSen and rsi[5]>70 and (rsi[1]-rsi)>5
plotshape(buyRSI,style=shape.triangleup,color=lime,transp=0,location=location.belowbar,size=size.small)
sell= sell2 and sell3 or (sell1 and buyCompteur <= 8) or sellRSI
buy=buy2 and buy3 or (buy1 and sellCompteur <=8) or buyRSI
plotchar(buy,char='B',size=size.small,color=lime)
plotchar(sell,char='S',size=size.small,color=orange)
//plots
plot(KijunSen,title="Kijun-Sen",color=blue,linewidth=4)
plot(TenkanSen,title="Tenkan-Sen",color=red,linewidth=2)
cloudA = plot(SenkouSpanA,title="cloud A", color=lime,offset=26,linewidth=2)
cloudB = plot(SenkouSpanB,title="cloud B", color=orange,offset=26,linewidth=2)
plot(ChikouSpan,title="lag span",color=fuchsia, linewidth=2,offset=-26)
//plot()
fill(cloudA,cloudB,color=SenkouSpanA>SenkouSpanB?lime:orange)
//plot(close,color=silver,linewidth=4)
// === ALERTS ===
strategy.entry("L", strategy.long, when=(buy and (time > timestamp(FromYear, FromMonth, FromDay, 00, 00)) and (time < timestamp(ToYear, ToMonth, ToDay, 23, 59))))
strategy.close("L", when=(sell and (time < timestamp(ToYear, ToMonth, ToDay, 23, 59))))