Inputs
14 entries. What each one takes, what it returns, and a working example.
input(default, min?, max?, step?, name?, group?, tooltip?, inline?, options?)
An optimizable parameter value.
Optimization sweeps from min to max with step; if min/max are not given, it behaves like a fixed value.
inputBool(varsayılan, başlık?)
The checkbox state (the default if none is chosen).
Defines an on/off checkbox; to toggle showing/hiding a feature. Opens a control in the editor's settings panel; during computation it returns the selected value (the default).
goster = inputBool(true, "Ortalamayi Goster") plot(iff(goster, sma(close, 20), na))
Defines a checkbox; when ticked the average is plotted, otherwise it is left empty.
inputColor(varsayılan, başlık?)
The chosen color.
Defines a color-picker parameter; to leave a line/fill color to the user. Opens a control in the editor's settings panel; during computation it returns the selected value (the default).
c = inputColor("#26a69a", "Cizgi Rengi") plot(close, color=c)
Makes the line color adjustable and plots price in that color.
inputEnum(varsayılan, başlık?)
The chosen option text.
Defines a bounded list parameter; to choose among a few fixed modes. Opens a control in the editor's settings panel; during computation it returns the selected value (the default).
m = inputEnum("mean", "Mod") plot(iff(m == "mean", sma(close, 20), ema(close, 20)))
Branches on a mode-selecting parameter; when it is "mean", the simple average is plotted.
inputFloat(varsayılan, başlık?)
The decimal number chosen by the user.
Defines a decimal parameter; for fractional values such as a multiplier or threshold. Opens a control in the editor's settings panel; during computation it returns the selected value (the default).
k = inputFloat(2.0, "Carpan") plot(atr(14) * k)
Defines an adjustable multiplier and plots ATR scaled by it.
The integer chosen by the user (the default if none is chosen).
Defines an integer parameter; for counter values such as a window length. Opens a control in the editor's settings panel; during computation it returns the selected value (the default).
len = inputInt(20, "Pencere") plot(sma(close, len))
Defines an adjustable window length and plots the moving average of that length.
inputPrice(varsayılan, başlık?)
The chosen price level.
A parameter that selects a price level; to let the user set a target or stop line. Opens a control in the editor's settings panel; during computation it returns the selected value (the default).
lvl = inputPrice(100.0, "Seviye") plot(iff(close > lvl, close, na))
Defines an adjustable price level and plots while price is above it.
inputSession(varsayılan, başlık?)
The chosen session text.
A parameter that selects a trading-session range; to let the user set intraday filters. Opens a control in the editor's settings panel; during computation it returns the selected value (the default).
sess = inputSession("0930-1600", "Seans") plot(iff(strLength(sess) > 0, close, na))
Defines an adjustable session range and plots price while it is non-empty.
The chosen price series (the default if none is chosen).
A parameter that selects which price series to use; so an indicator can run on high/hl2 instead of close. Opens a control in the editor's settings panel; during computation it returns the selected value (the default).
src = inputSource(close, "Kaynak") plot(sma(src, 20))
Lets the user choose which price series the average is taken over.
inputString(varsayılan, başlık?)
The text entered by the user.
Defines a free-text parameter; such as a mode name or a label. Opens a control in the editor's settings panel; during computation it returns the selected value (the default).
mod = inputString("trend", "Mod") plot(iff(mod == "trend", close, open))
Branches on a text parameter; when it is "trend", close is plotted.
inputSymbol(varsayılan, başlık?)
The chosen symbol text.
A parameter that selects a symbol; for taking a symbol name for a comparison or multi-symbol read. Opens a control in the editor's settings panel; during computation it returns the selected value (the default).
s = inputSymbol("BTCUSDT", "Sembol") plot(iff(strLength(s) > 0, close, na))
Defines an adjustable symbol name and plots price while it is non-empty.
inputTextArea(varsayılan, başlık?)
The (possibly multi-line) text entered by the user.
Defines a multi-line free-text parameter; for longer inputs such as a note or a list. Opens a control in the editor's settings panel; during computation it returns the selected value (the default).
note = inputTextArea("aciklama metni", "Not") plot(iff(strLength(note) > 0, close, na))
Defines a multi-line note field and plots price while it is non-empty.
inputTime(varsayılan, başlık?)
The chosen timestamp.
A parameter that selects a date/time; to let the user set time bounds such as a start date. Opens a control in the editor's settings panel; during computation it returns the selected value (the default).
t = inputTime(1700000000, "Baslangic") plot(iff(t > 0, close, na))
Defines an adjustable start time and plots price while it is positive.
inputTimeframe(varsayılan, başlık?)
The chosen timeframe text.
A parameter that selects a timeframe; to let the user set higher-timeframe reads. Opens a control in the editor's settings panel; during computation it returns the selected value (the default).
tf = inputTimeframe("1D", "Zaman Dilimi") plot(timeframeInSeconds(tf))
Defines an adjustable timeframe and plots its length in seconds.