Selcoin/ docs
SelScriptFonksiyonlar

strategy.close

Eşleşen açık pozisyonu sonraki mum açılışında kapatır.

Eşleşen açık pozisyonu sonraki mum açılışında kapatır.

ParametreTürVarsayılan
entryIdstringZorunlu

Dönüş: void. Koşul içinde çağrılabilir.

//@selscript=1
strategy("EMA Simulation", overlay=true)
fast = ta.ema(close, 12)
slow = ta.ema(close, 26)
buy = ta.crossover(fast, slow)
sell = ta.crossunder(fast, slow)
plot.fill(fast, slow, color=fast >= slow ? "#22c55e40" : "#ef444440")
if buy:
    strategy.entry("L", strategy.long)
if sell:
    strategy.close("L")
if strategy.position_size > 0:
    strategy.exit("Protection", "L", stop=strategy.position_avg_price * 0.97, limit=strategy.position_avg_price * 1.06)

Hesaplama kuralları, erişim ve sınırlar.