
Chiến lược này được gọi là chiến lược Binary Gold Cross Finch, nó kết hợp các chỉ số MACD, chỉ số RSI tương đối mạnh và lý thuyết rút lui / mở rộng Fibonacci trong nguyên tắc đường phân chia vàng để thực hiện giao dịch định lượng đối với các loại tiền điện tử như Bitcoin.
Ưu điểm lớn nhất của chiến lược này là có thể hoạt động cả ngày và đêm, có thể làm giảm đáng kể chi phí vận hành nhân công. Ngoài ra, có thể tăng tỷ lệ chiến thắng bằng cách kết hợp nhiều chỉ số, hiệu quả đặc biệt rõ ràng trong thị trường bò. Các lợi thế cụ thể như sau:
Chiến lược này cũng có một số rủi ro, chủ yếu là từ sự đảo ngược của thị trường lớn, khi đó việc dừng lỗ có thể khó có tác dụng. Ngoài ra, thời gian giữ vị trí quá dài cũng có một số rủi ro. Các điểm rủi ro chính như sau:
Các giải pháp tương ứng là:
Chiến lược này có thể được tối ưu hóa theo các hướng sau:
Chiến lược này tổng hợp nhiều chỉ số định lượng để xác định thời gian mua và bán, có thể tự động hóa giao dịch thị trường tiền điện tử 24 giờ. Bằng cách tối ưu hóa các tham số của các chỉ số và thêm nhiều chỉ số phụ trợ, có thể nâng cao hơn nữa mức lợi nhuận của chiến lược. Chiến lược này có thể tiết kiệm rất nhiều chi phí thời gian vận hành bằng tay cho người dùng, đáng để các nhà giao dịch định lượng nghiên cứu và áp dụng sâu hơn.
/*backtest
start: 2023-12-18 00:00:00
end: 2023-12-25 00:00:00
period: 10m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © onurenginogutcu
//@version=4
strategy("STRATEGY R18-F-BTC", overlay=true, margin_long=100, margin_short=100)
///////////default girişler 1 saatlik btc grafiği için geçerli olmak üzere - stop loss'lar %2.5 - long'da %7.6 , short'ta %8.1
sym = input(title="Symbol", type=input.symbol, defval="BINANCE:BTCUSDT") /////////btc'yi indikatör olarak alıyoruz
lsl = input(title="Long Stop Loss (%)",
minval=0.0, step=0.1, defval=2.5) * 0.01
ssl = input(title="Short Stop Loss (%)",
minval=0.0, step=0.1, defval=2.5) * 0.01
longtp = input(title="Long Take Profit (%)",
minval=0.0, step=0.1, defval=7.6) * 0.01
shorttp = input(title="Short Take Profit (%)",
minval=0.0, step=0.1, defval=7.5) * 0.01
capperc = input(title="Capital Percentage to Invest (%)",
minval=0.0, maxval=100, step=0.1, defval=90) * 0.01
choice = input(title="Reverse ?", type=input.bool, defval=false)
symClose = security(sym, "", close)
symHigh = security(sym, "", high)
symLow = security(sym, "", low)
i = ema (symClose , 15) - ema (symClose , 30) ///////// ema close 15 ve 30 inanılmaz iyi sonuç verdi (macd standartı 12 26)
r = ema (i , 9)
sapust = highest (i , 100) * 0.729 //////////0.729 altın oran oldu 09.01.2022
sapalt = lowest (i , 100) * 0.729 //////////0.729 altın oran oldu 09.01.2022
///////////highx = highest (close , 365) * 0.72 fibo belki dahiledilebilir
///////////lowx = lowest (close , 365) * 1.272 fibo belki dahil edilebilir
simRSI = rsi (symClose , 50 ) /////// RSI DAHİL EDİLDİ "50 MUMLUK RSI EN İYİ SONUCU VERİYOR"
//////////////fibonacci seviyesi eklenmesi amacı ile koyuldu fakat en iyi sonuç %50 seviyesinin altı ve üstü (low ve high 38 barlık) en iyi sonuç verdi
fibvar = 38
fibtop = lowest (symLow , fibvar) + ((highest (symHigh , fibvar) - lowest (symLow , fibvar)) * 0.50)
fibbottom = lowest (symLow , fibvar) + ((highest (symHigh , fibvar) - lowest (symLow , fibvar)) * 0.50)
///////////////////////////////////////////////////////////// INDICATOR CONDITIONS
longCondition = crossover(i, r) and i < sapalt and symClose < sma (symClose , 50) and simRSI < sma (simRSI , 50) and symClose < fibbottom
shortCondition = crossunder(i, r) and i > sapust and symClose > sma (symClose , 50) and simRSI > sma (simRSI , 50) and symClose > fibtop
////////////////////////////////////////////////////////////////
///////////////////////////////////////////STRATEGY ENTRIES AND STOP LOSSES /////stratejilerde kalan capital için strategy.equity kullan (bunun üzerinden işlem yap)
if (choice == false and longCondition)
strategy.entry("Long", strategy.long , qty = capperc * strategy.equity / close , when = strategy.position_size == 0)
if (choice == false and shortCondition)
strategy.entry("Short" , strategy.short , qty = capperc * strategy.equity / close , when = strategy.position_size == 0)
if (choice == true and longCondition)
strategy.entry("Short" , strategy.short , qty = capperc * strategy.equity / close , when = strategy.position_size == 0)
if (choice == true and shortCondition)
strategy.entry("Long", strategy.long , qty = capperc * strategy.equity / close , when = strategy.position_size == 0)
if (strategy.position_size > 0)
strategy.exit("Exit Long", "Long", stop=strategy.position_avg_price*(1 - lsl) , limit=strategy.position_avg_price*(1 + longtp))
if (strategy.position_size < 0)
strategy.exit("Exit Short", "Short", stop=strategy.position_avg_price*(1 + ssl) , limit=strategy.position_avg_price*(1 - shorttp))
////////////////////////vertical colouring signals
bgcolor(color=longCondition ? color.new (color.green , 70) : na)
bgcolor(color=shortCondition ? color.new (color.red , 70) : na)