SeekAlgo/Docs/Migration Guide
Docs/sdk/Migration Guide

Migration Guide

How to move older scripts to the current syntax.

Migration Guide

This guide maps the older $... forms to the current syntax.

Core Mapping

Legacy Current
$script({ is_price_study: true }) `script({ type: 'indicator'
$symbols([...]) symbols([...])
$input({ name, type, defval }) input.integer(...), input.float(...), or input.bool(...)
$symbol.close[index].get(offset) symbol.close[index].get(offset)
$talib.* ta.*

What To Change First

  1. replace legacy input declarations with input.*
  2. replace basket declarations with symbols([...])
  3. rename $symbol access to symbol
  4. keep strategy.entry({ ... }) and strategy.exit({ ... }) in object form

Example Migration

Legacy style:

$script({ is_price_study: true });
$symbols(['BTCUSDT:BINANCE:FUTURE:DEFAULT']);
let length = $input({ name: 'Length', type: 'integer', defval: 14 });
let closeValue = $symbol.close[0].get(0);

Current style:

script({ type: 'strategy', priceStudy: true });

symbols(['BTCUSDT:BINANCE:FUTURE:DEFAULT']);
const length = input.integer('Length', 14);
const closeValue = symbol.close[0].get(0);

Migration Rules

  • keep the symbol order stable
  • keep the trade ids stable
  • do not mix old and new input forms in the same script
  • re-test the script after each conversion step