Untitled
unknown
plain_text
10 months ago
1.1 kB
26
Indexable
// Input for signal selection
strategy_selector = input.string("ott", "Signal Selection", options=["ott", "tott", "risotto", "sott", "hl", "rott", "ft"])
// Conditional Logic for Buy/Sell Signals
long1 = switch strategy_selector
"ott" => ott_long
"tott" => tott_long
"risotto" => risotto_long
"sott" => sott_long
"hl" => hl_long
"rott" => rott_long
"ft" => ft_long
short1 = switch strategy_selector
"ott" => ott_short
"tott" => tott_short
"risotto" => risotto_short
"sott" => sott_short
"hl" => hl_short
"rott" => rott_short
"ft" => ft_short
// Trade Execution Logic
long_giris = long1 ? 1 : 0
long_cikis = short1 ? 1 : 0
short_giris = short1 ? 1 : 0
short_cikis = long1 ? 1 : 0
// Plot Signals
plot(long_giris, "Long giriş", display = display.data_window)
plot(long_cikis, "Long Çıkış", display = display.data_window)
plot(short_giris, "Short giriş", display = display.data_window)
plot(short_cikis, "Short Çıkış", display = display.data_window)Editor is loading...
Leave a Comment