KABABALIKABABALISCRIPT DOCS
AUTO + MANUAL KSL · SHARED EXECUTABLE REGISTRY

KababaliScript 2.4 Language Reference

KababaliScript (KSL) is the executable strategy language for custom and AI-generated algorithmic trading strategies for MetaTrader 5 (MT5) on Kababali. The compiler, closed-candle runtime, chart preview, and Historical Backtest read one native capability registry. AUTO AI Brain may generate only compiler-valid KSL candidates; MANUAL executes the exact trader-activated KSL without adaptive rewriting. Both paths use the same indicators and conditions while remaining isolated strategy authorities. The MT5 EA v3.84 stays a clean, guarded executor and does not recalculate local strategy indicators.

Executable functions93
Series indicators60
Boolean conditions28
Safe compatibility aliases62
ONE KSL LANGUAGE · SEPARATE STRATEGY AUTHORITY

Compiler-to-execution parity

A capability is shown as executable only when validation, runtime evaluation, chart preview, and historical replay share the implementation.

AUTO · MANUAL · BACKTEST
AUTO AI BrainGenerates an isolated KSL candidate, then passes the same compiler before preview or execution eligibility.
MANUAL KSLRuns the exact saved and activated script. AUTO adaptation never rewrites the trader's source.
Historical BacktestReplays the compiled KSL through the same closed-candle series, condition, stop, and target evaluator.
MT5 EA v3.84Uploads broker candles and executes authorized orders with identity and risk guards; strategy math stays on Kababali.com.
SUPPORTED NOW · 93 FUNCTIONS

Executable capability registry

Every card below is available to AUTO candidate validation, exact MANUAL execution, chart preview, and Historical Backtest.

ema()series
TrendAUTOMANUALBACKTEST
ema(series, positive_int)

Deterministic Trend capability backed by the shared closed-candle KSL runtime.

ema(close, 9)
sma()series
TrendAUTOMANUALBACKTEST
sma(series, positive_int)

Deterministic Trend capability backed by the shared closed-candle KSL runtime.

sma(close, 20)
wma()series
TrendAUTOMANUALBACKTEST
wma(series, positive_int)

Deterministic Trend capability backed by the shared closed-candle KSL runtime.

wma(close, 20)
dema()series
TrendAUTOMANUALBACKTEST
dema(series, positive_int)

Double EMA with reduced lag for responsive trend filtering.

dema(close, 20)
tema()series
TrendAUTOMANUALBACKTEST
tema(series, positive_int)

Triple EMA with stronger lag reduction for trend confirmation.

tema(close, 20)
hma()series
TrendAUTOMANUALBACKTEST
hma(series, positive_int)

Hull moving average using weighted smoothing for fast, low-lag trend tracking.

hma(close, 20)
smma()series
TrendAUTOMANUALBACKTEST
smma(series, positive_int)

Wilder-style smoothed moving average for stable trend and volatility calculations.

smma(close, 20)
rsi()series
MomentumAUTOMANUALBACKTEST
rsi(series, positive_int)

Deterministic Momentum capability backed by the shared closed-candle KSL runtime.

rsi(close, 14)
stochastic_k()series
MomentumAUTOMANUALBACKTEST
stochastic_k(series, series, series, positive_int)

Deterministic Momentum capability backed by the shared closed-candle KSL runtime.

stochastic_k(high, low, close, 14)
stochastic_d()series
MomentumAUTOMANUALBACKTEST
stochastic_d(series, series, series, positive_int, positive_int)

Deterministic Momentum capability backed by the shared closed-candle KSL runtime.

stochastic_d(high, low, close, 14, 3)
cci()series
MomentumAUTOMANUALBACKTEST
cci(series, series, series, positive_int)

Deterministic Momentum capability backed by the shared closed-candle KSL runtime.

cci(high, low, close, 20)
momentum()series
MomentumAUTOMANUALBACKTEST
momentum(series, positive_int)

Deterministic Momentum capability backed by the shared closed-candle KSL runtime.

momentum(close, 14)
roc()series
MomentumAUTOMANUALBACKTEST
roc(series, positive_int)

Percentage rate of change against the selected historical period.

roc(close, 14)
williams_r()series
MomentumAUTOMANUALBACKTEST
williams_r(series, series, series, positive_int)

Williams %R oscillator scaled from -100 to 0.

williams_r(high, low, close, 14)
awesome_oscillator()series
MomentumAUTOMANUALBACKTEST
awesome_oscillator(series, series, positive_int, positive_int)

Fast-minus-slow SMA of median price for momentum regime analysis.

awesome_oscillator(high, low, 5, 34)
macd_line()series
MomentumAUTOMANUALBACKTEST
macd_line(series, positive_int, positive_int)

Deterministic Momentum capability backed by the shared closed-candle KSL runtime.

macd_line(close, 12, 26)
macd_signal()series
MomentumAUTOMANUALBACKTEST
macd_signal(series, positive_int, positive_int, positive_int)

Deterministic Momentum capability backed by the shared closed-candle KSL runtime.

macd_signal(close, 12, 26, 9)
adx()series
MomentumAUTOMANUALBACKTEST
adx(series, series, series, positive_int)

Deterministic Momentum capability backed by the shared closed-candle KSL runtime.

adx(high, low, close, 14)
plus_di()series
MomentumAUTOMANUALBACKTEST
plus_di(series, series, series, positive_int)

Deterministic Momentum capability backed by the shared closed-candle KSL runtime.

plus_di(high, low, close, 14)
minus_di()series
MomentumAUTOMANUALBACKTEST
minus_di(series, series, series, positive_int)

Deterministic Momentum capability backed by the shared closed-candle KSL runtime.

minus_di(high, low, close, 14)
atr()series
VolatilityAUTOMANUALBACKTEST
atr(positive_int)

Deterministic Volatility capability backed by the shared closed-candle KSL runtime.

atr(14)
true_range()series
VolatilityAUTOMANUALBACKTEST
true_range(series, series, series)

Per-candle true range including gaps from the prior close.

true_range(high, low, close)
bb_mid()series
VolatilityAUTOMANUALBACKTEST
bb_mid(series, positive_int)

Deterministic Volatility capability backed by the shared closed-candle KSL runtime.

bb_mid(close, 20)
bb_upper()series
VolatilityAUTOMANUALBACKTEST
bb_upper(series, positive_int, positive_number)

Deterministic Volatility capability backed by the shared closed-candle KSL runtime.

bb_upper(close, 20, 2.0)
bb_lower()series
VolatilityAUTOMANUALBACKTEST
bb_lower(series, positive_int, positive_number)

Deterministic Volatility capability backed by the shared closed-candle KSL runtime.

bb_lower(close, 20, 2.0)
stddev()series
VolatilityAUTOMANUALBACKTEST
stddev(series, positive_int)

Rolling population standard deviation of a series.

stddev(close, 20)
variance()series
VolatilityAUTOMANUALBACKTEST
variance(series, positive_int)

Rolling population variance of a series.

variance(close, 20)
zscore()series
VolatilityAUTOMANUALBACKTEST
zscore(series, positive_int)

Rolling standard score showing distance from the mean in standard deviations.

zscore(close, 20)
linear_regression()series
StatisticsAUTOMANUALBACKTEST
linear_regression(series, positive_int)

Rolling least-squares regression value at the latest point in each window.

linear_regression(close, 20)
slope()series
StatisticsAUTOMANUALBACKTEST
slope(series, positive_int)

Rolling least-squares slope of a series.

slope(close, 20)
median()series
StatisticsAUTOMANUALBACKTEST
median(series, positive_int)

Rolling statistical median of a series.

median(close, 20)
typical_price()series
Price levelsAUTOMANUALBACKTEST
typical_price(series, series, series)

Average of high, low, and close.

typical_price(high, low, close)
weighted_close()series
Price levelsAUTOMANUALBACKTEST
weighted_close(series, series, series)

Weighted close price: high + low + 2×close, divided by four.

weighted_close(high, low, close)
vwap()series
VolumeAUTOMANUALBACKTEST
vwap(series, series)

Deterministic Volume capability backed by the shared closed-candle KSL runtime.

vwap(close, volume)
obv()series
VolumeAUTOMANUALBACKTEST
obv(series, series)

Deterministic Volume capability backed by the shared closed-candle KSL runtime.

obv(close, volume)
mfi()series
MomentumAUTOMANUALBACKTEST
mfi(series, series, series, series, positive_int)

Deterministic Momentum capability backed by the shared closed-candle KSL runtime.

mfi(high, low, close, volume, 14)
chaikin_money_flow()series
VolumeAUTOMANUALBACKTEST
chaikin_money_flow(series, series, series, series, positive_int)

Rolling Chaikin Money Flow from OHLC and volume.

chaikin_money_flow(high, low, close, volume, 20)
volume_sma()series
VolumeAUTOMANUALBACKTEST
volume_sma(series, positive_int)

Simple moving average of volume for participation filters.

volume_sma(volume, 20)
keltner_mid()series
VolatilityAUTOMANUALBACKTEST
keltner_mid(series, positive_int)

EMA center line for a Keltner Channel.

keltner_mid(close, 20)
keltner_upper()series
VolatilityAUTOMANUALBACKTEST
keltner_upper(series, series, series, series, positive_int, positive_number)

EMA center plus ATR multiplied by the registered channel multiplier.

keltner_upper(close, high, low, close, 20, 1.5)
keltner_lower()series
VolatilityAUTOMANUALBACKTEST
keltner_lower(series, series, series, series, positive_int, positive_number)

EMA center minus ATR multiplied by the registered channel multiplier.

keltner_lower(close, high, low, close, 20, 1.5)
supertrend()series
TrendAUTOMANUALBACKTEST
supertrend(series, series, series, positive_int, positive_number)

Deterministic Trend capability backed by the shared closed-candle KSL runtime.

supertrend(high, low, close, 14, 3.0)
parabolic_sar()series
TrendAUTOMANUALBACKTEST
parabolic_sar(series, series, positive_number, positive_number)

Deterministic Trend capability backed by the shared closed-candle KSL runtime.

parabolic_sar(high, low, 0.02, 0.2)
pivot_point()series
Price levelsAUTOMANUALBACKTEST
pivot_point(series, series, series)

Deterministic Price levels capability backed by the shared closed-candle KSL runtime.

pivot_point(high, low, close)
pivot_r1()series
Price levelsAUTOMANUALBACKTEST
pivot_r1(series, series, series)

Deterministic Price levels capability backed by the shared closed-candle KSL runtime.

pivot_r1(high, low, close)
pivot_s1()series
Price levelsAUTOMANUALBACKTEST
pivot_s1(series, series, series)

Deterministic Price levels capability backed by the shared closed-candle KSL runtime.

pivot_s1(high, low, close)
pivot_r2()series
Price levelsAUTOMANUALBACKTEST
pivot_r2(series, series, series)

Deterministic Price levels capability backed by the shared closed-candle KSL runtime.

pivot_r2(high, low, close)
pivot_s2()series
Price levelsAUTOMANUALBACKTEST
pivot_s2(series, series, series)

Deterministic Price levels capability backed by the shared closed-candle KSL runtime.

pivot_s2(high, low, close)
donchian_high()series
VolatilityAUTOMANUALBACKTEST
donchian_high(series, positive_int)

Deterministic Volatility capability backed by the shared closed-candle KSL runtime.

donchian_high(high, 20)
donchian_low()series
VolatilityAUTOMANUALBACKTEST
donchian_low(series, positive_int)

Deterministic Volatility capability backed by the shared closed-candle KSL runtime.

donchian_low(low, 20)
highest()series
StatisticsAUTOMANUALBACKTEST
highest(series, positive_int)

Deterministic Statistics capability backed by the shared closed-candle KSL runtime.

highest(high, 20)
lowest()series
StatisticsAUTOMANUALBACKTEST
lowest(series, positive_int)

Deterministic Statistics capability backed by the shared closed-candle KSL runtime.

lowest(low, 20)
ichimoku_conversion()series
TrendAUTOMANUALBACKTEST
ichimoku_conversion(positive_int)

Deterministic Trend capability backed by the shared closed-candle KSL runtime.

ichimoku_conversion(9)
ichimoku_base()series
TrendAUTOMANUALBACKTEST
ichimoku_base(positive_int)

Deterministic Trend capability backed by the shared closed-candle KSL runtime.

ichimoku_base(26)
ichimoku_span_a()series
TrendAUTOMANUALBACKTEST
ichimoku_span_a(positive_int, positive_int)

Deterministic Trend capability backed by the shared closed-candle KSL runtime.

ichimoku_span_a(9, 26)
ichimoku_span_b()series
TrendAUTOMANUALBACKTEST
ichimoku_span_b(positive_int)

Deterministic Trend capability backed by the shared closed-candle KSL runtime.

ichimoku_span_b(52)
higher_close()series
Higher timeframeAUTOMANUALBACKTEST
higher_close(timeframe)

Deterministic Higher timeframe capability backed by the shared closed-candle KSL runtime.

higher_close(M5)
higher_ema()series
Higher timeframeAUTOMANUALBACKTEST
higher_ema(timeframe, series, positive_int)

Deterministic Higher timeframe capability backed by the shared closed-candle KSL runtime.

higher_ema(M5, close, 21)
custom_ma()series
TrendAUTOMANUALBACKTEST
custom_ma(series, positive_int, enum:ma)

Deterministic Trend capability backed by the shared closed-candle KSL runtime.

custom_ma(close, 20, EMA)
custom_oscillator()series
MomentumAUTOMANUALBACKTEST
custom_oscillator(series, positive_int, enum:oscillator)

Deterministic Momentum capability backed by the shared closed-candle KSL runtime.

custom_oscillator(close, 14, RSI)
crossover()bool
Signal conditionsAUTOMANUALBACKTEST
crossover(series, series)

Deterministic Signal conditions capability backed by the shared closed-candle KSL runtime.

crossover(fastEma, slowEma)
crossunder()bool
Signal conditionsAUTOMANUALBACKTEST
crossunder(series, series)

Deterministic Signal conditions capability backed by the shared closed-candle KSL runtime.

crossunder(fastEma, slowEma)
rising()bool
Signal conditionsAUTOMANUALBACKTEST
rising(series, positive_int)

True when the current value is above every value in the prior lookback window.

rising(close, 3)
falling()bool
Signal conditionsAUTOMANUALBACKTEST
falling(series, positive_int)

True when the current value is below every value in the prior lookback window.

falling(close, 3)
above_for()bool
Signal conditionsAUTOMANUALBACKTEST
above_for(series, series, positive_int)

True only when the first series stayed above the second for all requested closed candles.

above_for(fastEma, slowEma, 3)
below_for()bool
Signal conditionsAUTOMANUALBACKTEST
below_for(series, series, positive_int)

True only when the first series stayed below the second for all requested closed candles.

below_for(fastEma, slowEma, 3)
break_of_structure_up()bool
Market structureAUTOMANUALBACKTEST
break_of_structure_up(positive_int)

Deterministic Market structure capability backed by the shared closed-candle KSL runtime.

break_of_structure_up(20)
break_of_structure_down()bool
Market structureAUTOMANUALBACKTEST
break_of_structure_down(positive_int)

Deterministic Market structure capability backed by the shared closed-candle KSL runtime.

break_of_structure_down(20)
choch_up()bool
Market structureAUTOMANUALBACKTEST
choch_up(positive_int)

Deterministic Market structure capability backed by the shared closed-candle KSL runtime.

choch_up(20)
choch_down()bool
Market structureAUTOMANUALBACKTEST
choch_down(positive_int)

Deterministic Market structure capability backed by the shared closed-candle KSL runtime.

choch_down(20)
liquidity_sweep_high()bool
Market structureAUTOMANUALBACKTEST
liquidity_sweep_high(positive_int)

Deterministic Market structure capability backed by the shared closed-candle KSL runtime.

liquidity_sweep_high(20)
liquidity_sweep_low()bool
Market structureAUTOMANUALBACKTEST
liquidity_sweep_low(positive_int)

Deterministic Market structure capability backed by the shared closed-candle KSL runtime.

liquidity_sweep_low(20)
bullish_divergence()bool
Signal conditionsAUTOMANUALBACKTEST
bullish_divergence(series, series, positive_int)

Deterministic Signal conditions capability backed by the shared closed-candle KSL runtime.

bullish_divergence(close, rsiValue, 20)
bearish_divergence()bool
Signal conditionsAUTOMANUALBACKTEST
bearish_divergence(series, series, positive_int)

Deterministic Signal conditions capability backed by the shared closed-candle KSL runtime.

bearish_divergence(close, rsiValue, 20)
retest_long()bool
Signal conditionsAUTOMANUALBACKTEST
retest_long(series, positive_int)

Deterministic Signal conditions capability backed by the shared closed-candle KSL runtime.

retest_long(level, 10)
retest_short()bool
Signal conditionsAUTOMANUALBACKTEST
retest_short(series, positive_int)

Deterministic Signal conditions capability backed by the shared closed-candle KSL runtime.

retest_short(level, 10)
candle_bullish_engulfing()bool
Candle patternsAUTOMANUALBACKTEST
candle_bullish_engulfing()

Deterministic Candle patterns capability backed by the shared closed-candle KSL runtime.

candle_bullish_engulfing()
candle_bearish_engulfing()bool
Candle patternsAUTOMANUALBACKTEST
candle_bearish_engulfing()

Deterministic Candle patterns capability backed by the shared closed-candle KSL runtime.

candle_bearish_engulfing()
candle_hammer()bool
Candle patternsAUTOMANUALBACKTEST
candle_hammer()

Deterministic hammer geometry on the latest closed candle.

candle_hammer()
candle_shooting_star()bool
Candle patternsAUTOMANUALBACKTEST
candle_shooting_star()

Deterministic shooting-star geometry on the latest closed candle.

candle_shooting_star()
candle_doji()bool
Candle patternsAUTOMANUALBACKTEST
candle_doji()

True when the latest candle body is at most 10% of its full range.

candle_doji()
inside_bar()bool
Candle patternsAUTOMANUALBACKTEST
inside_bar()

True when the latest closed candle is fully inside the prior candle range.

inside_bar()
outside_bar()bool
Candle patternsAUTOMANUALBACKTEST
outside_bar()

True when the latest closed candle fully exceeds the prior candle range.

outside_bar()
volume_spike()bool
Signal conditionsAUTOMANUALBACKTEST
volume_spike(positive_int, volatility_multiplier)

True when current volume exceeds its rolling average by the chosen multiplier.

volume_spike(20, 1.5)
in_session()bool
Signal conditionsAUTOMANUALBACKTEST
in_session(session)

Deterministic Signal conditions capability backed by the shared closed-candle KSL runtime.

in_session("LONDON")
volatility_low()bool
VolatilityAUTOMANUALBACKTEST
volatility_low(positive_int, volatility_multiplier)

Deterministic Volatility capability backed by the shared closed-candle KSL runtime.

volatility_low(14, 1.5)
volatility_normal()bool
VolatilityAUTOMANUALBACKTEST
volatility_normal(positive_int, volatility_multiplier)

Deterministic Volatility capability backed by the shared closed-candle KSL runtime.

volatility_normal(14, 1.5)
volatility_high()bool
VolatilityAUTOMANUALBACKTEST
volatility_high(positive_int, volatility_multiplier)

Deterministic Volatility capability backed by the shared closed-candle KSL runtime.

volatility_high(14, 1.5)
swing_low()stop
Risk and exitsAUTOMANUALBACKTEST
swing_low(positive_int)

Deterministic Risk and exits capability backed by the shared closed-candle KSL runtime.

swing_low(10)
swing_high()stop
Risk and exitsAUTOMANUALBACKTEST
swing_high(positive_int)

Deterministic Risk and exits capability backed by the shared closed-candle KSL runtime.

swing_high(10)
atr_stop()stop
Risk and exitsAUTOMANUALBACKTEST
atr_stop(positive_number)

Deterministic Risk and exits capability backed by the shared closed-candle KSL runtime.

atr_stop(1.5)
rr()target
Risk and exitsAUTOMANUALBACKTEST
rr(reward_risk)

Deterministic Risk and exits capability backed by the shared closed-candle KSL runtime.

rr(2.0)
fixed_pips()distance
Risk and exitsAUTOMANUALBACKTEST
fixed_pips(positive_number)

Deterministic Risk and exits capability backed by the shared closed-candle KSL runtime.

fixed_pips(20)
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 naming
ATR()atr()Common naming
average_true_range()atr()Common naming
bollinger_lower()bb_lower()Common naming
bollinger_mid()bb_mid()Common naming
bollinger_upper()bb_upper()Common naming
bos_down()break_of_structure_down()Common naming
bos_up()break_of_structure_up()Common naming
CCI()cci()Common naming
CMF()chaikin_money_flow()Common naming
DEMA()dema()Common naming
di_minus()minus_di()Common naming
di_plus()plus_di()Common naming
EMA()ema()Common naming
exponential_moving_average()ema()Common naming
HMA()hma()Common naming
keltner_channel_lower()keltner_lower()Common naming
keltner_channel_mid()keltner_mid()Common naming
keltner_channel_upper()keltner_upper()Common naming
liquidity_sweep_buy()liquidity_sweep_low()Common naming
liquidity_sweep_sell()liquidity_sweep_high()Common naming
macd()macd_line()Common naming
macd_sig()macd_signal()Common naming
MFI()mfi()Common naming
OBV()obv()Common naming
relative_strength_index()rsi()Common naming
RMA()smma()Common naming
ROC()roc()Common naming
RSI()rsi()Common naming
simple_moving_average()sma()Common naming
SMA()sma()Common naming
ta.adx()adx()AI/Pine compatibility
ta.atr()atr()AI/Pine compatibility
ta.cci()cci()AI/Pine compatibility
ta.cmf()chaikin_money_flow()AI/Pine compatibility
ta.crossover()crossover()AI/Pine compatibility
ta.crossunder()crossunder()AI/Pine compatibility
ta.dema()dema()AI/Pine compatibility
ta.ema()ema()AI/Pine compatibility
ta.falling()falling()AI/Pine compatibility
ta.highest()highest()AI/Pine compatibility
ta.hma()hma()AI/Pine compatibility
ta.linreg()linear_regression()AI/Pine compatibility
ta.lowest()lowest()AI/Pine compatibility
ta.median()median()AI/Pine compatibility
ta.mfi()mfi()AI/Pine compatibility
ta.obv()obv()AI/Pine compatibility
ta.rising()rising()AI/Pine compatibility
ta.rma()smma()AI/Pine compatibility
ta.roc()roc()AI/Pine compatibility
ta.rsi()rsi()AI/Pine compatibility
ta.sma()sma()AI/Pine compatibility
ta.stdev()stddev()AI/Pine compatibility
ta.tema()tema()AI/Pine compatibility
ta.variance()variance()AI/Pine compatibility
ta.vwap()vwap()AI/Pine compatibility
ta.wma()wma()AI/Pine compatibility
ta.wpr()williams_r()AI/Pine compatibility
TEMA()tema()Common naming
VWAP()vwap()Common naming
weighted_moving_average()wma()Common naming
WMA()wma()Common naming
KSL 2.4 EXAMPLE

Professional shared-runtime strategy

version 2;
strategy "HMA Keltner Participation" {
  timeframe = M5;
  input int trendPeriod = 21 min 5 max 100;
  input int channelPeriod = 20 min 5 max 100;
  let trend = hma(close, trendPeriod);
  let upper = keltner_upper(close, high, low, close, channelPeriod, 1.5);
  let momentum = zscore(close, 20);
  let buySignal = close > trend
    && rising(trend, 3)
    && close < upper
    && momentum > 0
    && volume_spike(20, 1.5);

  buy {
    when = buySignal;
    entry = ask;
    stop = atr_stop(1.5);
    target = rr(2.0);
  }

  plot(trend, color.green, "HMA Trend");
  plot(upper, color.cyan, "Keltner Upper");
  draw(buySignal);
}

Shared behavior: The same source can be compiler-validated as an AUTO candidate or activated exactly in MANUAL, then replayed by Historical Backtest. Arithmetic + - * /, parentheses, and normal precedence remain fail-closed on zero or non-finite division.

LIVE-TRADING SAFETY

What KSL still refuses

  • Unknown indicators or functions without tested runtime implementation
  • Loops, arrays, imports, arbitrary network/database access, or dynamic execution
  • Forming-candle dependencies for strategy conditions
  • Silent conversion or substitution of unsupported strategy meaning
  • Activation when compiler validation or runtime identity checks fail

An admin registry entry marked Draft is documentation only. It becomes safely convertible only when mapped to an executable native function. A genuinely new indicator requires compiler, runtime, history, replay, and parity tests before this page can advertise it.

RECOMMENDED CURRENT FLOW

Idea → Compatibility → Validate → Backtest / Template → WATCH → Activate

1Write exact rulesDefine direction, timeframe, indicator parameters, risk, and confirmation logic.
2Generate or edit KSLAUTO and MANUAL both stay inside the executable registry; strategy ownership remains separate.
3Compile + ValidateReject unknown calls, invalid types, unsafe history, and unsupported meaning before activation.
4Replay the same KSLHistorical Backtest uses the shared evaluator but remains simulation, not Verified Evidence.
5WATCH before liveAudit closed-candle behavior on demo, then activate only the intended validated revision.