
Strategi Stop Loss Mobile Fisherman adalah strategi perdagangan kuantitatif yang menggabungkan indikator Fisherman dan mekanisme Stop Loss Mobile. Strategi ini menggunakan indikator Fisherman untuk menghasilkan sinyal beli dan jual, sambil mengatur tracking stop loss untuk mengunci keuntungan, untuk mendapatkan keuntungan lebih besar sambil melindungi keuntungan.
Parameter dapat dioptimalkan dengan menyesuaikan rasio stop loss, menguji kombinasi parameter yang berbeda; memfilter sinyal dalam kombinasi dengan indikator lain; mengatur aturan manajemen posisi untuk mengendalikan risiko tunggal.
Strategi Stop Loss Mobile Fisherman’s Indicator yang mengintegrasikan penilaian tren dan manajemen stop loss, dapat disesuaikan dengan sebagian besar varietas melalui pengoptimalan parameter, kombinasi indikator, dan perbaikan metode stop loss, untuk mendapatkan keuntungan yang lebih baik dengan asumsi mencegah kerugian di luar yang dapat ditanggung, layak untuk dieksplorasi dan dipraktekkan.
/*backtest
start: 2023-01-26 00:00:00
end: 2024-02-01 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Fisher_Yurik Strategy with Trailing Stop", shorttitle="FY Strategy", overlay=true)
// Date Ranges
from_month = input(defval = 1, title = "From Month")
from_day = input(defval = 1, title = "From Day")
from_year = input(defval = 2021, title = "From Year")
to_month = input(defval = 1, title = "To Month")
to_day = input(defval = 1, title = "To Day")
to_year = input(defval = 9999, title = "To Year")
start = timestamp(from_year, from_month, from_day, 00, 00) // backtest start window
finish = timestamp(to_year, to_month, to_day, 23, 59) // backtest finish window
window = true
period = input(2, title='Period')
cost = input.float(1.05, title='profit level ', step=0.01)
dusus = input.float(1.02, title='after the signal', step=0.01)
var float Value = na
var float Fish = na
var float ExtBuffer1 = na
var float ExtBuffer2 = na
price = (high + low) / 2
MaxH = ta.highest(high, period)
MinL = ta.lowest(low, period)
Value := 0.33 * 2 * ((price - MinL) / (MaxH - MinL) - 0.5) + 0.67 * nz(Value[1])
Value := math.max(math.min(Value, 0.999), -0.999)
Fish := 0.5 * math.log((1 + Value) / (1 - Value)) + 0.5 * nz(Fish[1])
up = Fish >= 0
ExtBuffer1 := up ? Fish : na
ExtBuffer2 := up ? na : Fish
var float entryPrice = na
var float stopPrice = na
if (ExtBuffer1 > ExtBuffer1[1])
entryPrice := close*dusus
stopPrice := close * cost
if (ExtBuffer2 < ExtBuffer2[1])
entryPrice := close
stopPrice := close * cost
// Sadece seçilen test döneminde işlem yapma koşulu eklenmiştir
strategy.entry("Buy", strategy.long, when=ExtBuffer1 > ExtBuffer1[1] and window)
strategy.exit("Take Profit/Trailing Stop", from_entry="Buy", when=(close >= entryPrice * cost) or (close < stopPrice), trail_offset=0.08, trail_price=entryPrice * cost)