Chiến lược này kết hợp các tín hiệu giao dịch song phương của TSI và các chỉ số CCI được cải tiến, và áp dụng phương pháp phòng ngừa rủi ro cho các vị trí thường xuyên mở và đóng, nhằm mục đích theo đuổi lợi nhuận liên tục ổn định hơn.
Chiến lược chủ yếu dựa trên sự kết hợp giữa các chỉ số TSI và HMACCI.
Chỉ số TSI chứa một đường trung bình di chuyển nhanh và một đường chậm để xác định tín hiệu giao dịch. Khi đường nhanh vượt qua đường chậm lên, đó là tín hiệu mua, và ngược lại đối với tín hiệu bán. Điều này có thể nắm bắt những thay đổi trong xu hướng thị trường một cách nhạy cảm hơn.
Chỉ số HMACCI dựa trên chỉ số CCI truyền thống sử dụng Hull Moving Average thay vì chính giá, có thể lọc một số tiếng ồn và đánh giá các khu vực mua quá mức và bán quá mức.
Lý thuyết chính của chiến lược là kết hợp các đánh giá của hai chỉ số này và thiết lập một số điều kiện bổ sung để lọc các tín hiệu sai, chẳng hạn như kiểm tra giá đóng cửa và giá tối đa và tối thiểu của thanh trước trong nhiều giai đoạn để kiểm soát chất lượng của tín hiệu đảo ngược.
Đối với các vị trí mở, nếu các điều kiện được đáp ứng, các lệnh thị trường được đặt mỗi khi thanh đóng cửa, đi cả dài và ngắn.
Để lấy lợi nhuận và dừng lỗ, dừng lỗ nổi và đóng tất cả các lệnh khi đạt được lợi nhuận mục tiêu được thiết lập.
Đây là một chiến lược bảo hiểm tần số cao tương đối ổn định và đáng tin cậy.
Những rủi ro chính cần lưu ý là:
Các rủi ro có thể được giảm bằng cách:
Vẫn còn nhiều chỗ để tối ưu hóa chiến lược này, chủ yếu là:
Nhìn chung, chiến lược này là một chiến lược phòng ngừa rủi ro ổn định, đáng tin cậy với khả năng chịu lỗi cao. Nó kết hợp các chỉ số xu hướng và đảo ngược, thu được lợi nhuận ổn định thông qua giao dịch hai hướng thường xuyên. Ngoài ra, chính chiến lược có tiềm năng tối ưu hóa mạnh mẽ và đại diện cho một ý tưởng giao dịch tần số cao có giá trị để nghiên cứu thêm.
/*backtest start: 2023-12-01 00:00:00 end: 2023-12-31 23:59:59 period: 1h basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ // This source code is subject to the terms of the suns bipolarity //©SeaSide420 //@version=4 strategy(title="TSI HMA CCI", default_qty_type=strategy.cash,default_qty_value=1000,commission_type=strategy.commission.percent,commission_value=0.001) long = input(title="TSI Long Length", type=input.integer, defval=25) short = input(title="TSI Short Length", type=input.integer, defval=25) signal = input(title="TSI Signal Length", type=input.integer, defval=13) length = input(33, minval=1, title="HMACCI Length") src = input(open, title="Price Source") ld = input(50, minval=1, title="Line Distance") CandlesBack = input(8,minval=1,title="Candles Look Back") StopLoss= input(3000,minval=1, title="Stop Loss") TargetProfitAll= input(3000,minval=1, title="Target Profit Close All") FromMonth=input(defval=1,title="FromMonth",minval=1,maxval=12) FromDay=input(defval=1,title="FromDay",minval=1,maxval=31) FromYear=input(defval=2020,title="FromYear",minval=2020) ToMonth=input(defval=1,title="ToMonth",minval=1,maxval=12) ToDay=input(defval=1,title="ToDay",minval=1,maxval=31) ToYear=input(defval=9999,title="ToYear",minval=2017) start=timestamp(FromYear,FromMonth,FromDay,00,00) finish=timestamp(ToYear,ToMonth,ToDay,23,59) window()=>true ul = (ld) ll = (ld-ld*2) ma = hma(src, length) cci = (src - ma) / (0.015 * dev(src, length)) price = close double_smooth(src, long, short) => fist_smooth = ema(src, long) ema(fist_smooth, short) pc = change(price) double_smoothed_pc = double_smooth(pc, long, short) double_smoothed_abs_pc = double_smooth(abs(pc), long, short) tsi_value = 100 * (double_smoothed_pc / double_smoothed_abs_pc)*10 tsi_value2=ema(tsi_value/10, signal)*10 cc = color.white ct = color.new(color.gray, 90) if cci<ll or cci[1]<ll cc:=color.red if cci>ul or cci[1]>ul cc:=color.green if cci<ul and cci>ll cc:=color.new(color.yellow, 90) ccc = color.white if cci>ul ccc:=color.green if cci<cci[1] and cci<ul and cci>ll ccc:=color.red if cci<ll ccc:=color.red if cci>cci[1] and cci>ll and cci<ul ccc:=color.green tsiplot= plot(tsi_value, color=color.lime) tsiplot2=plot(tsi_value2, color=color.red) colorchange2 =tsi_value>tsi_value2?color.lime:color.orange fill(tsiplot, tsiplot2, color=colorchange2, title="TSIBackground", transp=50) band1 = hline(ul, "Upper Band 1", color=ct, linestyle=hline.style_dashed) band0 = hline(ll, "Lower Band 1", color=ct, linestyle=hline.style_dashed) fill(band1, band0, color=cc, title="MidBandBackground", transp=0) band2 = hline(ul, "Upper Band 2", color=ct, linestyle=hline.style_dashed) band3 = hline(ll, "Lower Band 2", color=ct, linestyle=hline.style_dashed) cciplot2 = plot(cci, "CCIvHMA 2", color=color.black, transp=0, linewidth=5) cciplot = plot(cci, "CCIvHMA", color=ccc, transp=0, linewidth=3) hline(0, title="Zero") hline(420, title="420") hline(-420, title="-420") fill(cciplot, cciplot2, color=ccc, title="CCIBackground", transp=0) LongCondition=cci>cci[1] and cci>ll and src>src[CandlesBack] and tsi_value>tsi_value2 ShortCondition=cci<cci[1] and cci<ul and src<src[CandlesBack] and tsi_value<tsi_value2 plotshape(LongCondition, title="BUY", style=shape.circle, location=location.top, color=color.green) plotshape(ShortCondition, title="SELL", style=shape.circle, location=location.top, color=color.red) if strategy.openprofit>TargetProfitAll strategy.close_all(when=window(),comment="close all profit target") if LongCondition and strategy.openprofit>-1 strategy.order("BUY", strategy.long,when=window()) if ShortCondition and strategy.openprofit>-1 strategy.order("SELL", strategy.short,when=window()) strategy.exit("SL exit a sell", "SELL", loss = StopLoss,when=window()) strategy.exit("SL exit a buy", "BUY", loss = StopLoss,when=window())