
Chiến lược bắt chéo ngược là một chiến lược phức hợp kết hợp các giao dịch ngược và các giao dịch chéo. Nó sử dụng hình thức giá đảo ngược để tạo ra tín hiệu giao dịch trước tiên, sau đó lọc kết hợp với các giao dịch chéo đa chiều của các chỉ số ngẫu nhiên để nắm bắt cơ hội đảo ngược trong thị trường ngắn hạn.
Chiến lược này bao gồm hai chiến lược con:
Chiến lược tổng hợp này đánh giá các tín hiệu của hai chiến lược con, tạo ra tín hiệu giao dịch thực tế khi các tín hiệu giao dịch của hai chiến lược con phù hợp.
Chiến lược này kết hợp đảo ngược và giao thoa chỉ số, tổng hợp thông tin về giá cả và chỉ số, có thể lọc hiệu quả các tín hiệu giả, khai thác cơ hội đảo ngược tiềm năng và tăng tỷ lệ lợi nhuận.
Những ưu điểm cụ thể bao gồm:
Chiến lược này cũng có những rủi ro:
Những rủi ro này có thể được kiểm soát bằng cách điều chỉnh các tham số chỉ số, thiết lập các cơ chế dừng lỗ.
Chiến lược này có thể được tối ưu hóa từ các khía cạnh sau:
Chiến lược thu thập chéo ngược sử dụng lợi thế của nhiều chiến lược tổng hợp, với khả năng kiếm lợi nhuận mạnh mẽ với giả định kiểm soát rủi ro. Bằng cách liên tục tối ưu hóa và cải tiến, bạn có thể tạo ra chiến lược hiệu quả phù hợp với phong cách của mình, từ khả năng đối phó với môi trường thị trường thay đổi.
/*backtest
start: 2024-01-09 00:00:00
end: 2024-01-16 00:00:00
period: 10m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 15/09/2021
// This is combo strategies for get a cumulative signal.
//
// First strategy
// This System was created from the Book "How I Tripled My Money In The
// Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
// The strategy buys at market, if close price is higher than the previous close
// during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
// The strategy sells at market, if close price is lower than the previous close price
// during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
//
// Second strategy
// This back testing strategy generates a long trade at the Open of the following
// bar when the %K line crosses below the %D line and both are above the Overbought level.
// It generates a short trade at the Open of the following bar when the %K line
// crosses above the %D line and both values are below the Oversold level.
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
Reversal123(Length, KSmoothing, DLength, Level) =>
vFast = sma(stoch(close, high, low, Length), KSmoothing)
vSlow = sma(vFast, DLength)
pos = 0.0
pos := iff(close[2] < close[1] and close > close[1] and vFast < vSlow and vFast > Level, 1,
iff(close[2] > close[1] and close < close[1] and vFast > vSlow and vFast < Level, -1, nz(pos[1], 0)))
pos
StochCross(Length, DLength,Oversold,Overbought) =>
pos = 0.0
vFast = stoch(close, high, low, Length)
vSlow = sma(vFast, DLength)
pos := iff(vFast < vSlow and vFast > Overbought and vSlow > Overbought, 1,
iff(vFast >= vSlow and vFast < Oversold and vSlow < Oversold, -1, nz(pos[1], 0)))
pos
strategy(title="Combo Backtest 123 Reversal & Stochastic Crossover", shorttitle="Combo", overlay = true)
line1 = input(true, "---- 123 Reversal ----")
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
line2 = input(true, "---- Stochastic Crossover ----")
LengthSC = input(7, minval=1)
DLengthSC = input(3, minval=1)
Oversold = input(20, minval=1)
Overbought = input(70, minval=1)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posmStochCross = StochCross(LengthSC, DLengthSC,Oversold,Overbought)
pos = iff(posReversal123 == 1 and posmStochCross == 1 , 1,
iff(posReversal123 == -1 and posmStochCross == -1, -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)
if (possig == 0)
strategy.close_all()
barcolor(possig == -1 ? #b50404: possig == 1 ? #079605 : #0536b3 )