OFFICIAL EXECUTABLE REGISTRY
KababaliScript Language Reference
This page is generated from the same native registry used by the compiler. If a function is not listed as executable here, the KSL editor must not silently assume it exists.
SUPPORTED NOW
Executable functions
These are compiler-registered and runtime-backed. Search before asking an AI to generate a complex strategy.
ema()seriesema(series, positive_int)
ema(close, 9)
sma()seriessma(series, positive_int)
sma(close, 20)
wma()serieswma(series, positive_int)
wma(close, 20)
rsi()seriesrsi(series, positive_int)
rsi(close, 14)
stochastic_k()seriesstochastic_k(series, series, series, positive_int)
stochastic_k(high, low, close, 14)
stochastic_d()seriesstochastic_d(series, series, series, positive_int, positive_int)
stochastic_d(high, low, close, 14, 3)
cci()seriescci(series, series, series, positive_int)
cci(high, low, close, 20)
momentum()seriesmomentum(series, positive_int)
momentum(close, 14)
macd_line()seriesmacd_line(series, positive_int, positive_int)
macd_line(close, 12, 26)
macd_signal()seriesmacd_signal(series, positive_int, positive_int, positive_int)
macd_signal(close, 12, 26, 9)
adx()seriesadx(series, series, series, positive_int)
adx(high, low, close, 14)
plus_di()seriesplus_di(series, series, series, positive_int)
plus_di(high, low, close, 14)
minus_di()seriesminus_di(series, series, series, positive_int)
minus_di(high, low, close, 14)
atr()seriesatr(positive_int)
atr(14)
bb_mid()seriesbb_mid(series, positive_int)
bb_mid(close, 20)
bb_upper()seriesbb_upper(series, positive_int, positive_number)
bb_upper(close, 20, 2.0)
bb_lower()seriesbb_lower(series, positive_int, positive_number)
bb_lower(close, 20, 2.0)
vwap()seriesvwap(series, series)
vwap(close, volume)
obv()seriesobv(series, series)
obv(close, volume)
mfi()seriesmfi(series, series, series, series, positive_int)
mfi(high, low, close, volume, 14)
supertrend()seriessupertrend(series, series, series, positive_int, positive_number)
supertrend(high, low, close, 14, 3.0)
parabolic_sar()seriesparabolic_sar(series, series, positive_number, positive_number)
parabolic_sar(high, low, 0.02, 0.2)
pivot_point()seriespivot_point(series, series, series)
pivot_point(high, low, close)
pivot_r1()seriespivot_r1(series, series, series)
pivot_r1(high, low, close)
pivot_s1()seriespivot_s1(series, series, series)
pivot_s1(high, low, close)
pivot_r2()seriespivot_r2(series, series, series)
pivot_r2(high, low, close)
pivot_s2()seriespivot_s2(series, series, series)
pivot_s2(high, low, close)
donchian_high()seriesdonchian_high(series, positive_int)
donchian_high(high, 20)
donchian_low()seriesdonchian_low(series, positive_int)
donchian_low(low, 20)
highest()serieshighest(series, positive_int)
highest(high, 20)
lowest()serieslowest(series, positive_int)
lowest(low, 20)
ichimoku_conversion()seriesichimoku_conversion(positive_int)
ichimoku_conversion(9)
ichimoku_base()seriesichimoku_base(positive_int)
ichimoku_base(26)
ichimoku_span_a()seriesichimoku_span_a(positive_int, positive_int)
ichimoku_span_a(9, 26)
ichimoku_span_b()seriesichimoku_span_b(positive_int)
ichimoku_span_b(52)
higher_close()serieshigher_close(timeframe)
higher_close(M5)
higher_ema()serieshigher_ema(timeframe, series, positive_int)
higher_ema(M5, close, 21)
custom_ma()seriescustom_ma(series, positive_int, enum:ma)
custom_ma(close, 20, EMA)
custom_oscillator()seriescustom_oscillator(series, positive_int, enum:oscillator)
custom_oscillator(close, 14, RSI)
crossover()boolcrossover(series, series)
crossover(fastEma, slowEma)
crossunder()boolcrossunder(series, series)
crossunder(fastEma, slowEma)
break_of_structure_up()boolbreak_of_structure_up(positive_int)
break_of_structure_up(20)
break_of_structure_down()boolbreak_of_structure_down(positive_int)
break_of_structure_down(20)
choch_up()boolchoch_up(positive_int)
choch_up(20)
choch_down()boolchoch_down(positive_int)
choch_down(20)
liquidity_sweep_high()boolliquidity_sweep_high(positive_int)
liquidity_sweep_high(20)
liquidity_sweep_low()boolliquidity_sweep_low(positive_int)
liquidity_sweep_low(20)
bullish_divergence()boolbullish_divergence(series, series, positive_int)
bullish_divergence(close, rsiValue, 20)
bearish_divergence()boolbearish_divergence(series, series, positive_int)
bearish_divergence(close, rsiValue, 20)
retest_long()boolretest_long(series, positive_int)
retest_long(level, 10)
retest_short()boolretest_short(series, positive_int)
retest_short(level, 10)
candle_bullish_engulfing()boolcandle_bullish_engulfing()
candle_bullish_engulfing()
candle_bearish_engulfing()boolcandle_bearish_engulfing()
candle_bearish_engulfing()
in_session()boolin_session(session)
in_session("LONDON")
volatility_low()boolvolatility_low(positive_int, volatility_multiplier)
volatility_low(14, 1.5)
volatility_normal()boolvolatility_normal(positive_int, volatility_multiplier)
volatility_normal(14, 1.5)
volatility_high()boolvolatility_high(positive_int, volatility_multiplier)
volatility_high(14, 1.5)
swing_low()stopswing_low(positive_int)
swing_low(10)
swing_high()stopswing_high(positive_int)
swing_high(10)
atr_stop()stopatr_stop(positive_number)
atr_stop(1.5)
rr()targetrr(reward_risk)
rr(2.0)
fixed_pips()distancefixed_pips(positive_number)
fixed_pips(20)
No registered function matches that search.
AI / PROFESSIONAL STRATEGY IMPORT
Safe compatibility aliases
The Compatibility Checker can rename these known terms to native KSL. It does not change the trading logic or invent missing features.
AI / alternate nameNative KSLCategory
ADX()adx()Common namingATR()atr()Common namingaverage_true_range()atr()Common namingbollinger_lower()bb_lower()Common namingbollinger_mid()bb_mid()Common namingbollinger_upper()bb_upper()Common namingbos_down()break_of_structure_down()Common namingbos_up()break_of_structure_up()Common namingCCI()cci()Common namingdi_minus()minus_di()Common namingdi_plus()plus_di()Common namingEMA()ema()Common namingexponential_moving_average()ema()Common namingliquidity_sweep_buy()liquidity_sweep_low()Common namingliquidity_sweep_sell()liquidity_sweep_high()Common namingmacd()macd_line()Common namingmacd_sig()macd_signal()Common namingMFI()mfi()Common namingOBV()obv()Common namingrelative_strength_index()rsi()Common namingRSI()rsi()Common namingsimple_moving_average()sma()Common namingSMA()sma()Common namingta.adx()adx()AI/Pine compatibilityta.atr()atr()AI/Pine compatibilityta.cci()cci()AI/Pine compatibilityta.crossover()crossover()AI/Pine compatibilityta.crossunder()crossunder()AI/Pine compatibilityta.ema()ema()AI/Pine compatibilityta.highest()highest()AI/Pine compatibilityta.lowest()lowest()AI/Pine compatibilityta.mfi()mfi()AI/Pine compatibilityta.obv()obv()AI/Pine compatibilityta.rsi()rsi()AI/Pine compatibilityta.sma()sma()AI/Pine compatibilityta.vwap()vwap()AI/Pine compatibilityta.wma()wma()AI/Pine compatibilityVWAP()vwap()Common namingweighted_moving_average()wma()Common namingWMA()wma()Common namingMinimal KSL v2 strategy
version 2;
strategy "Professional Setup" {
timeframe = M5;
input int period = 21 min 2 max 100;
let trend = ema(close, period);
let buySignal = close > trend;
buy {
when = buySignal;
entry = ask;
stop = atr_stop(1.5);
target = rr(2.0);
}
plot(trend, color.green, "EMA");
draw(buySignal);
}What KSL refuses
- Unknown indicators or functions that have no runtime implementation
- Loops, arrays, imports, arbitrary network/database access, or dynamic execution
- Forming-candle dependencies for strategy conditions
- Silent conversion of unsupported strategy meaning
- Activation when validation fails
An admin registry entry marked Draft is documentation only. It becomes safely convertible only when mapped to an already executable native function; a genuinely new indicator still requires tested runtime implementation.
AI strategy → Compatibility Check → Validate → Activate
1Write the ideaTrader describes the exact rules.
2Generate KSLAI uses this registry and prompt guide.
3Check CompatibilityNative, convertible, or unsupported capabilities are identified.
4ValidateThe compiler remains the final authority.
5WATCH firstClosed-candle behavior is audited before live execution.