이 전략은 비트코인의 진정한 강도 지수 (True Strength Index, TSI) 를 계산하여 시장의 흐름을 식별하고 RSI 지수 필터링과 결합하여 더 많은 단축 시간을 할애하여 비트코인에 대한 짧은 라인 거래를 구현합니다. 이 전략은 비트코인 시장에 대한 절차적 거래에 필요한 투자자에게 적합합니다.
이 전략은 주로 실제 강도 약도 지표 ((TSI) 를 기반으로 한다. TSI 지표는 쌍 평면 가격 변화율을 통해 가격 변화의 절대값 크기와 방향을 측정하여 가격 상승과 하락의 절대 강도를 식별한다. 구체적인 계산 방법은 다음과 같다:
TSI 지표 상단에서 신호선tsi2를 통과하면 다중 신호가 발생하고, 신호선tsi2를 통과하면 공백 신호가 발생한다. 또한, 전략은 RSI 지표 필터링 TSI 거래 신호를 결합하여 RSI 값이 50보다 크면만 다중 신호가 발생하고, RSI 값이 50보다 작으면 공백 신호가 발생하여 일부 가짜 신호를 필터링한다.
이 전략은 다음과 같은 장점을 가지고 있습니다.
이 전략에는 다음과 같은 위험도 있습니다.
RSI 필터 조건을 적절하게 완화하고 EMA 주기를 줄임으로써 파동 효과와 지연 문제를 줄일 수 있습니다. 동시에 손실을 막는 전략을 최적화하고 단일 거래 위험을 엄격하게 제어합니다.
이 전략은 다음과 같은 부분에서 최적화될 수 있습니다.
TSI와 RSI의 변수를 최적화하여 최적의 변수 조합을 찾습니다. 긴 EMA 주기를 조정할 수 있습니다.
다른 지표들이 결합되어 다인자 모델을 형성한다. 예를 들어 MA, KD 등의 지표들이 추가되어 각 지표들의 장점을 충분히 발휘한다.
입시 조건을 최적화하여 다목적 시장을 공중으로 충돌하는 것을 피하고 공중시장을 공중으로 충돌하는 것을 피한다. 대주기 경향에 따라 방향을 판단할 수 있다.
이동식 스톱, 시간 스톱, 브레이크 스톱과 같은 스톱 전략을 최적화하십시오.
퇴장 조건을 최적화하여 너무 일찍 또는 너무 늦게 퇴장하는 것을 방지하십시오. 경기 출전이 언제인지 판단할 수 있는 변동률 지표와 결합 할 수 있습니다.
거래 품종과 거래 시간에 최적화, 가장 효과적인 품종과 거래 시간에 집중
이 전략은 실제 강한 지표를 통해 비트코인의 단기 트렌드를 식별하고 RSI 지표 필터링 신호를 보조하여 비트코인의 단선 프로그래밍 거래를 효과적으로 수행 할 수 있습니다. 이 전략은 민감한 트렌드를 식별하고, 잡음을 제거하는 장점이 있지만, 또한 약간의 뒤처진 문제와 거래 위험이 있습니다. 다방면으로 최적화하면 전략의 성능을 더욱 향상시킬 수 있으며 신뢰할 수있는 비트코인 거래 전문가 자문을 개발할 수 있습니다.
/*backtest
start: 2022-09-30 00:00:00
end: 2023-10-06 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// strategy("True Strength Indicator BTCUSD 15p", shorttitle="TSI BTCUSD 15p",initial_capital=1000, commission_value=0.15, commission_type =strategy.commission.percent, default_qty_value=100 , overlay = false, pyramiding=10, default_qty_type=strategy.percent_of_equity)
//BASED ON True Strength Indicator MTF
resCustom = input(title="Timeframe", defval="15" )
long = input(title="Long Length", defval=25)
short = input(title="Short Length", defval=13)
signal = input(title="Signal Length", defval=13)
price = request.security(syminfo.tickerid,resCustom,close)
double_smooth(src, long, short) =>
fist_smooth = ta.ema(src, long)
ta.ema(fist_smooth, short)
pc = ta.change(price)
double_smoothed_pc = double_smooth(pc, long, short)
double_smoothed_abs_pc = double_smooth(math.abs(pc), long, short)
tsi_value = 100 * (double_smoothed_pc / double_smoothed_abs_pc)
tsi2=ta.ema(tsi_value, signal)
plot(tsi_value, color=color.lime,linewidth=2)
plot(tsi2, color=color.red,linewidth=2)
rsiserie = ta.rsi(price,7)
cciserie = ta.cci(price,14)
stochserie = ta.stoch(price,14,3,3)
plot(rsiserie,color=color.purple)
hline(30, title="Zero")
hline(50, title="Zero",linestyle=hline.style_solid, linewidth=2)
hline(70, title="Zero")
buy = ta.crossover(tsi_value, tsi2) //and rsiserie[1]<25 //and cciserie<-100 and stochserie<20
sell = ta.crossunder(tsi_value, tsi2) //and rsiserie[1]>85 //and cciserie>100 and stochserie>80
alertcondition(buy, title='TSI system', message='Buy signal at!' )
alertcondition(sell, title='TSI system', message='Sell signal at!' )
strategy.entry("BUY", strategy.long, 1, when = buy)
strategy.entry("SELL", strategy.short, 1, when = sell )
greentsi =tsi_value
redtsi = tsi2
bgcolor( greentsi>redtsi and rsiserie > 50 ? color.lime : na, transp=90)
bgcolor( greentsi<redtsi and rsiserie < 50 ? color.red : na, transp=90)
yellow1= redtsi > greentsi and rsiserie > 50
yellow2 = redtsi < greentsi and rsiserie < 50
bgcolor( yellow1 ? yellow : na, transp=80)
bgcolor( yellow2 ? yellow : na, transp=50)
bgcolor( yellow1 and yellow1[1] ? yellow : na, transp=70)
bgcolor( yellow2 and yellow2[2] ? yellow : na, transp=70)
bgcolor( rsiserie > 70 ? color.lime : na, transp=60)
bgcolor( rsiserie < 30 ? color.red : na, transp=60)