kScript is designed to be intuitive whether you’re coming from PineScript or learning to code for the first time. Create technical indicators, analyze market trends, and study order flow with powerful yet accessible tools. The syntax is straightforward and easy to learn - you’ll be building working indicators in minutes.
Advanced Example: RSI IndicatorFull-featured RSI with customizable inputs, smooth rendering, and proper styling
RSI Indicator
Copy
//@version=2// Indicator definitiondefine(title="RSI", position="offchart", axis=true);// Customizable user inputsvar splineColors = input(name="myColor", type="color", defaultValue="orange");var width = input(name="width", type="number", defaultValue=2);var period = input(name="period", type="number", defaultValue=26);var smooth = input(name="smooth", type="boolean", defaultValue=true);// Data subscription - load OHLCV data from the current charttimeseries trade = ohlcv(symbol=currentSymbol, exchange=currentExchange);// Local variablevar fill = true;// Create RSI time series using the built-in technical indicator function "rsi()"// The close price is accessed through trade.close propertyvar transformedData = rsi(source=trade.close, period=period);// Prepare final plot datavar baseLine = 0;var combinedData = [transformedData, baseLine];// Actually plot the data// Plot an area spline with baseline and RSI values// Use "transparent" as the second line's color so it's hiddenplotLine(value=combinedData, colors=[splineColors, "transparent"], width=width, fill=fill, smooth=smooth, label=["RSI"], desc=["Relative Strength Index"]);
The syntax is designed to be easy to read and write. If you know PineScript, kScript will feel familiar. If you’re new to coding, you’ll find it straightforward to learn. There are no timeout restrictions or calculation limits - your indicators can process large amounts of data without hitting walls that other platforms have.
Built for Performance
Most platforms impose strict limits that restrict what you can build. kScript removes these barriers:
No Timeout Limits
Process millions of data points without execution timeouts. Complex calculations run to completion.
Real-Time Execution
Indicators update instantly as market data changes. See your analysis in real-time without lag.
Years of Historical Data
Backtest your indicators with extensive historical datasets across all available data sources.
Institutional-Grade Data Sources
Access data that most platforms don’t offer. Build sophisticated indicators using institutional-grade market intelligence:
Order Book Depth
OHLCV Data
ETF Holdings
Options Flow
Funding Rates
Open Interest
Liquidations
Lending Rates
Wide Exchange Coverage
Access data from major centralized exchanges, derivatives platforms, decentralized exchanges, and price oracles. Build indicators that analyze and compare data across the entire crypto ecosystem.
CEXs
Binance, Coinbase, OKX
Derivatives
Deribit, Hyperliquid
DEXs
Uniswap, SushiSwap, PancakeSwap
Oracles
Pyth Network
Developer-First Features
Live Debugging
See your variables update in real-time as the market moves
Version Control
Built-in versioning for all your scripts with rollback capabilities
Transform your AI assistant into a kScript expert. Our reference document teaches ChatGPT, Claude, and other LLMs the exact kScript syntax - no more debugging broken AI-generated code.
Download Prompt
Get the kScript syntax guide optimized for LLMsDownload
Attach to AI
Upload to your ChatGPT or Claude conversation
Generate Code
Get working kScript with correct syntax every timeOpen Kiyotaka
While AI assistants become more helpful with our reference, always verify generated code. Complex strategies may need manual adjustments.
Your feedback is heard and implemented quickly - we’ve shipped 40+ community-requested features in the past month alone. Report a bug in the morning, see it fixed by afternoon. Suggest a function today, use it next week. This rapid iteration cycle means kScript evolves exactly how you need it to.