Selcoin/ docs
SelScriptFonksiyonlar

plot.fill

İki sayısal seri arasında koşullu renkli dolgu.

İki sayısal seri arasında koşullu renkli dolgu.

ParametreTürVarsayılan
valuenumberZorunlu
secondnumberZorunlu
titlestring"fill"
colorstring"#22c55e40"
visiblebooltrue
fromnumberna (mum açılış zamanı; latest=true ile kullanılır)
latestboolfalse (sabit)
extendstring"none" (sabit; none veya right)
force_overlayboolfalse (sabit; true fiyat grafiğine çizer)

color sabit, hex sabitleri arasından koşullu seçim veya color.from_gradient(...) ya da t değeri değişen color.alpha(c, t) gibi script çalışırken hesaplanan renk olabilir. Rengin na olduğu mumda Pine'daki gibi alan doldurulmaz. force_overlay=true, script kendi panelinde (overlay=false) çalışsa bile bu çıktıyı fiyat grafiğine çizer. Dönüş: void. Üst düzeyde çağrılır.

//@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)

Yalnız son bölge

latest=true ile yalnızca son mumun iki değeri, from (mum açılış zamanı; na ilk mum demektir) ile son mum arasında tek bir bant olarak çizilir. extend="right" bu bandı son mumun ötesine uzatır; extend yalnızca none veya right kabul eder, aksi halde derleme EXTEND hatası verir. latest=false iken from ve extend etkisizdir.

//@selscript=1
indicator("Breakout zone", overlay=true)
top = ta.highest(high, 20)
bottom = ta.lowest(low, 20)
start = ta.valuewhen(ta.crossover(close, top[1]), time, 0)
plot.fill(top, bottom, title="Zone", color="#3b82f640", latest=true, from=start, extend="right")

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

Bu sayfada