함수
입력값
이 묶음의 이름 10개예요.
형식과 예를 함께 적었어요.
input.int
사용자가 바꿀 수 있는 정수 (기간 등)
int(label: string, def: number, o?: { min?: number; max?: number } & InputOptions): numberconst len = input.int('Length', 14, { min: 2, max: 200 })input.number
사용자가 바꿀 수 있는 숫자
number(label: string, def: number, o?: { min?: number; max?: number; step?: number } & InputOptions): numberconst mult = input.number('Multiplier', 2, { step: 0.1 })input.bool
켜고 끄는 값
bool(label: string, def: boolean, o?: InputOptions): booleanconst show = input.bool('Show signals', true)input.select
목록에서 고르기 (글자나 숫자 목록)
select<T extends string | number>(label: string, options: T[], def: T, o?: InputOptions): Tconst kind = input.select('Type', ['EMA', 'SMA'], 'EMA')input.source
기준 가격 고르기 (종가·시가…)
source(label: string, def?: 'close' | 'open' | 'high' | 'low' | 'hl2' | 'hlc3' | 'ohlc4' | 'hlcc4', o?: InputOptions): Seriesconst src = input.source('Source', 'close')input.text
사용자가 적는 글자 (예: 선 번호 목록 '1,3,6'). 200자까지
text(label: string, def?: string, o?: InputOptions): stringconst list = input.text('Lines', '1,3,6')input.color
사용자가 고르는 색
color(label: string, def: Color, o?: InputOptions): Colorconst c = input.color('Line color', color.orange, { group: 'Style' })input.timeframe
사용자가 고르는 주기 (request.bars에 넘겨요). 기본 '1D'
timeframe(label: string, def?: Timeframe, o?: InputOptions): Timeframeconst tf = input.timeframe('Higher timeframe', '240')input.symbol
사용자가 고르는 종목 ('BINANCEF:ETHUSDT'처럼 거래소:종목). request.bars · request.data에 넘겨요
symbol(label: string, def: string, o?: InputOptions): stringconst other = input.symbol('Compare with', 'BINANCEF:ETHUSDT')input.time
사용자가 고르는 시각 (UTC 밀리초). 기본값은 숫자나 '2026-01-01T00:00:00Z' 같은 날짜. 앵커 VWAP 시작점 등
time(label: string, def: number | string, o?: InputOptions): numberconst from = input.time('Anchor', '2026-01-01T00:00:00Z')