/* tslint:disable */
/* eslint-disable */
export function zipOhlcvBars(open_time?: any[] | null, close_time?: any[] | null, open?: Float64Array | null, high?: Float64Array | null, low?: Float64Array | null, close?: Float64Array | null, volume?: Float64Array | null): OhlcvBar[];
export function _getCoreVersion(): string;
export function returns(equity: Float64Array, skip_first?: boolean | null): Float64Array;
export function stdev(values: Float64Array): number;
export function variance(values: Float64Array): number;
export function mean(values: Float64Array): number;
export function sum(values: Float64Array): number;
export function f1(precision: number, recall: number): number;
export function recall(tp_count: number, fn_count: number): number;
export function precision(tp_count: number, fp_count: number): number;
export function accuracy(tp_count: number, fp_count: number, fn_count: number, tn_count: number): number;
export function shortNetProfitPct(short_net_profit: number, initial_capital: number): number;
export function longNetProfitPct(long_net_profit: number, initial_capital: number): number;
export function grossLossPct(gross_loss: number, initial_capital: number): number;
export function grossProfitPct(gross_profit: number, initial_capital: number): number;
export function netProfitPct(net_profit: number, initial_capital: number): number;
export function omegaRatioFromReturns(returns: Float64Array, risk_free_rate: number): number;
export function omegaRatio(positive_returns_sum: number, negative_returns_sum: number, risk_free_rate: number): number;
export function sortinoRatioFromReturns(returns: Float64Array, risk_free_rate: number): number;
export function sortinoRatio(mean_returns: number, negative_returns_stdev: number, risk_free_rate: number): number;
export function sharpeRatioFromReturns(returns: Float64Array, risk_free_rate: number): number;
export function sharpeRatio(mean_returns: number, std_returns: number, risk_free_rate: number): number;
export function avgWinLossRatio(avg_winning_trade: number, avg_losing_trade: number): number;
export function avgLosingTrade(gross_loss: number, losing_trades: number): number;
export function avgWinningTrade(gross_profit: number, winning_trades: number): number;
export function avgTrade(net_profit: number, closed_trades: number): number;
export function winRate(profitable_trades: number, total_trades: number): number;
export function longNetProfitRatio(long_net_profit: number, short_net_profit: number): number;
export function profitFactor(gross_profit: number, gross_loss: number): number;
export function pnl(qty: number, entry_price: number, current_price: number): number;
export function expectancyScore(expectancy: number, opportunity_bars: number): number;
export function expectancy(pnl: Float64Array): number;
export function orderSizeForEquityPct(equity_pct: number, equity: number, current_position: number, instrument_price: number, point_value: number, exchange_rate: number): number;
export function orderSize(equity_pct: number, equity: number, exchange_rate: number, instrument_price: number, point_value: number): number;
export function validateContracts(size: number, min_qty: number): boolean;
export function roundContracts(size: number, min_qty: number, price_scale: number): number;
export function roundToMinTick(value: number, min_tick: number): number;
export class Backtest {
  free(): void;
  constructor(ctx: Ctx, initial_capital?: number | null, process_orders_on_close?: boolean | null);
  onBarOpen(): void;
  onBarClose(): void;
  signal(signal: Signal): void;
  signalList(signals: Array<any>): void;
  signalMap(signals: Map<any, any>): void;
  skip(skip: CtxSkip): void;
  length(): number;
  next(): number | undefined;
  toPine(): string;
  summary(risk_free_rate?: number | null): BacktestSummary;
  readonly initialCapital: number;
  readonly processOrdersOnClose: boolean;
  readonly ctx: Ctx;
  readonly equity: number;
  readonly netEquity: number;
  readonly equityList: Float64Array;
  readonly netEquityList: Float64Array;
  readonly pnlList: Float64Array;
  readonly openProfit: number;
  readonly netProfit: number;
  readonly grossProfit: number;
  readonly grossLoss: number;
  readonly positionSize: number;
  readonly trades: Trade[];
}
export class BacktestSummary {
  private constructor();
  free(): void;
  print(): void;
  toJSON(): any;
}
export class Ctx {
  free(): void;
  constructor(ohlcv?: Ohlcv | null, sym?: Sym | null);
  copy(): Ctx;
  reset(): void;
  next(): number | undefined;
  readonly barIndex: number;
  readonly bar: OhlcvBar;
  readonly isInitialized: boolean;
  readonly sym: Sym;
  readonly ohlcv: Ohlcv;
  readonly length: number;
}
export class CtxSkip {
  private constructor();
  free(): void;
  static end(): CtxSkip;
  static bars(bars: number): CtxSkip;
  static barIndex(bar_index: number): CtxSkip;
  static openTimeEq(open_time: Date): CtxSkip;
  static openTimeGeq(open_time: Date): CtxSkip;
}
export class Incr_fn_accdist_f39f2f {
  private constructor();
  free(): void;
  static make(ctx: Ctx): Incr_fn_accdist_f39f2f;
  next(): any;
  collect(): any[];
}
export class Incr_fn_rsi_3efcf2 {
  private constructor();
  free(): void;
  static make(ctx: Ctx): Incr_fn_rsi_3efcf2;
  next(src: any, length: any): any;
  collect(src: any, length: any): any[];
}
export class Ohlcv {
  free(): void;
  constructor();
  static fromBars(bars: OhlcvBar[]): Ohlcv;
  at(index: number): OhlcvBar | undefined;
  slice(start: number, end: number): Ohlcv;
  head(count: number): Ohlcv;
  tail(count: number): Ohlcv;
  copy(): Ohlcv;
  extend(other: Ohlcv): void;
  resample(timeframe: Timeframe, align_utc: boolean): Ohlcv;
  sort(ascending: boolean): void;
  reverse(): void;
  clear(): void;
  pop(): OhlcvBar | undefined;
  shift(): OhlcvBar | undefined;
  push(bar: OhlcvBar): void;
  pushMany(bars: OhlcvBar[]): void;
  toString(): string;
  sanityCheck(): string[];
  ref(): Ohlcv;
  timeframe: Timeframe;
  readonly openTime: Array<any>;
  readonly closeTime: Array<any>;
  readonly open: Float64Array;
  readonly high: Float64Array;
  readonly low: Float64Array;
  readonly close: Float64Array;
  readonly volume: Float64Array;
  readonly bars: OhlcvBar[];
  readonly length: number;
}
export class OhlcvBar {
  free(): void;
  constructor(open_time?: Date | null, close_time?: Date | null, open?: number | null, high?: number | null, low?: number | null, close?: number | null, volume?: number | null);
  merge(other: OhlcvBar): OhlcvBar;
  toString(): string;
  toJSON(): any;
  static fromJSON(json: any): OhlcvBar;
  readonly openTime: Date | undefined;
  readonly closeTime: Date | undefined;
  readonly open: number;
  readonly high: number;
  readonly low: number;
  readonly close: number;
  readonly volume: number;
}
export class Signal {
  private constructor();
  free(): void;
  static Hold(): Signal;
  static Size(size: number): Signal;
  static EquityPct(equity_pct: number): Signal;
  static CloseAll(): Signal;
  static Long(): Signal;
  static Short(): Signal;
  get id(): string | undefined;
  set id(value: string | null | undefined);
  get comment(): string | undefined;
  set comment(value: string | null | undefined);
}
export class Sym {
  free(): void;
  constructor();
  static BTC_USD(): Sym;
  static ETH_USD(): Sym;
  static SOL_USD(): Sym;
  static DOGE_USD(): Sym;
  toJSON(): any;
  static fromJSON(json: any): Sym;
  eq(other: Sym): boolean;
  get id(): string | undefined;
  set id(value: string | null | undefined);
  get tickerId(): string | undefined;
  set tickerId(value: string | null | undefined);
  kind: SymKind;
  minTick: number;
  minQty: number;
  get prefix(): string | undefined;
  set prefix(value: string | null | undefined);
  get currency(): string | undefined;
  set currency(value: string | null | undefined);
  get baseCurrency(): string | undefined;
  set baseCurrency(value: string | null | undefined);
  get ticker(): string | undefined;
  set ticker(value: string | null | undefined);
  get country(): string | undefined;
  set country(value: string | null | undefined);
  priceScale: number;
  pointValue: number;
  get metadata(): string | undefined;
  set metadata(value: string | null | undefined);
}
export class SymKind {
  private constructor();
  free(): void;
  toString(): string;
  static fromString(kind: string): SymKind;
  static Stock(): SymKind;
  static Future(): SymKind;
  static Option(): SymKind;
  static Crypto(): SymKind;
  static Forex(): SymKind;
  static Unknown(): SymKind;
  static Other(kind: string): SymKind;
  eq(other: SymKind): boolean;
}
export class Timeframe {
  private constructor();
  free(): void;
  toString(): string;
  static fromString(timeframe: string): Timeframe;
  static Years(value: number): Timeframe;
  static Months(value: number): Timeframe;
  static Weeks(value: number): Timeframe;
  static Days(value: number): Timeframe;
  static Hours(value: number): Timeframe;
  static Minutes(value: number): Timeframe;
  static Seconds(value: number): Timeframe;
  static Ticks(value: number): Timeframe;
  static Ranges(value: number): Timeframe;
  static Unknown(): Timeframe;
  eq(other: Timeframe): boolean;
  toDurationS(): number;
  static fromDurationS(duration: number): Timeframe;
  readonly years: number | undefined;
  readonly months: number | undefined;
  readonly weeks: number | undefined;
  readonly days: number | undefined;
  readonly hours: number | undefined;
  readonly minutes: number | undefined;
  readonly seconds: number | undefined;
  readonly ticks: number | undefined;
  readonly ranges: number | undefined;
  readonly unknown: boolean;
}
export class Trade {
  private constructor();
  free(): void;
  readonly size: number;
  readonly entry: TradeEvent | undefined;
  readonly exit: TradeEvent | undefined;
  readonly pnl: number;
  readonly direction: TradeDirection;
  readonly isActive: boolean;
  readonly isClosed: boolean;
}
export class TradeDirection {
  private constructor();
  free(): void;
  Long(): TradeDirection;
  Short(): TradeDirection;
  toNumber(): number;
  static fromNumber(value: number): TradeDirection;
}
export class TradeEvent {
  private constructor();
  free(): void;
  readonly id: string | undefined;
  readonly orderBarIndex: number;
  readonly fillBarIndex: number;
  readonly price: number;
  readonly comment: string | undefined;
}

export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

export interface InitOutput {
  readonly memory: WebAssembly.Memory;
  readonly incr_fn_rsi_3efcf2_make: (a: number) => number;
  readonly incr_fn_rsi_3efcf2_next: (a: number, b: any, c: any) => [number, number, number];
  readonly incr_fn_rsi_3efcf2_collect: (a: number, b: any, c: any) => [number, number, number, number];
  readonly __wbg_incr_fn_rsi_3efcf2_free: (a: number, b: number) => void;
  readonly incr_fn_accdist_f39f2f_make: (a: number) => number;
  readonly incr_fn_accdist_f39f2f_next: (a: number) => [number, number, number];
  readonly incr_fn_accdist_f39f2f_collect: (a: number) => [number, number, number, number];
  readonly __wbg_incr_fn_accdist_f39f2f_free: (a: number, b: number) => void;
  readonly signal_Hold: () => number;
  readonly signal_Size: (a: number) => number;
  readonly signal_EquityPct: (a: number) => number;
  readonly signal_CloseAll: () => number;
  readonly signal_Long: () => number;
  readonly signal_Short: () => number;
  readonly signal_wasm_id: (a: number) => [number, number];
  readonly signal_wasm_set_id: (a: number, b: number, c: number) => void;
  readonly signal_wasm_comment: (a: number) => [number, number];
  readonly signal_wasm_set_comment: (a: number, b: number, c: number) => void;
  readonly __wbg_signal_free: (a: number, b: number) => void;
  readonly sym_new: () => number;
  readonly sym_wasm_id: (a: number) => [number, number];
  readonly sym_wasm_set_id: (a: number, b: number, c: number) => void;
  readonly sym_wasm_ticker_id: (a: number) => [number, number];
  readonly sym_wasm_set_ticker_id: (a: number, b: number, c: number) => void;
  readonly sym_wasm_kind: (a: number) => number;
  readonly sym_wasm_set_kind: (a: number, b: number) => void;
  readonly sym_wasm_min_tick: (a: number) => number;
  readonly sym_wasm_set_min_tick: (a: number, b: number) => void;
  readonly sym_wasm_min_qty: (a: number) => number;
  readonly sym_wasm_set_min_qty: (a: number, b: number) => void;
  readonly sym_wasm_prefix: (a: number) => [number, number];
  readonly sym_wasm_set_prefix: (a: number, b: number, c: number) => void;
  readonly sym_wasm_currency: (a: number) => [number, number];
  readonly sym_wasm_set_currency: (a: number, b: number, c: number) => void;
  readonly sym_wasm_base_currency: (a: number) => [number, number];
  readonly sym_wasm_set_base_currency: (a: number, b: number, c: number) => void;
  readonly sym_wasm_ticker: (a: number) => [number, number];
  readonly sym_wasm_set_ticker: (a: number, b: number, c: number) => void;
  readonly sym_wasm_country: (a: number) => [number, number];
  readonly sym_wasm_set_country: (a: number, b: number, c: number) => void;
  readonly sym_wasm_price_scale: (a: number) => number;
  readonly sym_wasm_set_price_scale: (a: number, b: number) => void;
  readonly sym_wasm_point_value: (a: number) => number;
  readonly sym_wasm_set_point_value: (a: number, b: number) => void;
  readonly sym_wasm_metadata: (a: number) => [number, number];
  readonly sym_wasm_set_metadata: (a: number, b: number, c: number) => void;
  readonly sym_BTC_USD: () => number;
  readonly sym_ETH_USD: () => number;
  readonly sym_SOL_USD: () => number;
  readonly sym_DOGE_USD: () => number;
  readonly sym_toJSON: (a: number) => any;
  readonly sym_fromJSON: (a: any) => number;
  readonly sym_eq: (a: number, b: number) => number;
  readonly __wbg_sym_free: (a: number, b: number) => void;
  readonly symkind_toString: (a: number) => [number, number];
  readonly symkind_fromString: (a: number, b: number) => number;
  readonly symkind_Stock: () => number;
  readonly symkind_Future: () => number;
  readonly symkind_Option: () => number;
  readonly symkind_Crypto: () => number;
  readonly symkind_Forex: () => number;
  readonly symkind_Unknown: () => number;
  readonly symkind_Other: (a: number, b: number) => number;
  readonly symkind_eq: (a: number, b: number) => number;
  readonly __wbg_symkind_free: (a: number, b: number) => void;
  readonly zipOhlcvBars: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => [number, number];
  readonly ohlcv_wasm_new: () => number;
  readonly ohlcv_fromBars: (a: number, b: number) => number;
  readonly ohlcv_wasm_timeframe: (a: number) => number;
  readonly ohlcv_wasm_set_timeframe: (a: number, b: number) => void;
  readonly ohlcv_wasm_open_time: (a: number) => any;
  readonly ohlcv_wasm_close_time: (a: number) => any;
  readonly ohlcv_wasm_open: (a: number) => [number, number];
  readonly ohlcv_wasm_high: (a: number) => [number, number];
  readonly ohlcv_wasm_low: (a: number) => [number, number];
  readonly ohlcv_wasm_close: (a: number) => [number, number];
  readonly ohlcv_wasm_volume: (a: number) => [number, number];
  readonly ohlcv_wasm_bars: (a: number) => [number, number];
  readonly ohlcv_at: (a: number, b: number) => number;
  readonly ohlcv_wasm_length: (a: number) => number;
  readonly ohlcv_slice: (a: number, b: number, c: number) => number;
  readonly ohlcv_head: (a: number, b: number) => number;
  readonly ohlcv_tail: (a: number, b: number) => number;
  readonly ohlcv_copy: (a: number) => number;
  readonly ohlcv_extend: (a: number, b: number) => void;
  readonly ohlcv_resample: (a: number, b: number, c: number) => number;
  readonly ohlcv_sort: (a: number, b: number) => void;
  readonly ohlcv_reverse: (a: number) => void;
  readonly ohlcv_clear: (a: number) => void;
  readonly ohlcv_pop: (a: number) => number;
  readonly ohlcv_shift: (a: number) => number;
  readonly ohlcv_push: (a: number, b: number) => void;
  readonly ohlcv_pushMany: (a: number, b: number, c: number) => void;
  readonly ohlcv_toString: (a: number) => [number, number];
  readonly ohlcv_sanityCheck: (a: number) => [number, number];
  readonly ohlcv_ref: (a: number) => number;
  readonly __wbg_ohlcv_free: (a: number, b: number) => void;
  readonly ohlcvbar_wasm_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => number;
  readonly ohlcvbar_wasm_open_time: (a: number) => any;
  readonly ohlcvbar_wasm_close_time: (a: number) => any;
  readonly ohlcvbar_wasm_open: (a: number) => number;
  readonly ohlcvbar_wasm_high: (a: number) => number;
  readonly ohlcvbar_wasm_low: (a: number) => number;
  readonly ohlcvbar_wasm_close: (a: number) => number;
  readonly ohlcvbar_wasm_volume: (a: number) => number;
  readonly ohlcvbar_merge: (a: number, b: number) => number;
  readonly ohlcvbar_toString: (a: number) => [number, number];
  readonly ohlcvbar_toJSON: (a: number) => any;
  readonly ohlcvbar_fromJSON: (a: any) => number;
  readonly ctxskip_end: () => number;
  readonly ctxskip_bars: (a: number) => number;
  readonly ctxskip_barIndex: (a: number) => number;
  readonly ctxskip_openTimeEq: (a: any) => number;
  readonly ctxskip_openTimeGeq: (a: any) => number;
  readonly __wbg_ctxskip_free: (a: number, b: number) => void;
  readonly ctx_wasm_new: (a: number, b: number) => number;
  readonly ctx_wasm_bar_index: (a: number) => number;
  readonly ctx_wasm_bar: (a: number) => number;
  readonly ctx_wasm_is_initialized: (a: number) => number;
  readonly ctx_wasm_sym: (a: number) => number;
  readonly ctx_wasm_ohlcv: (a: number) => number;
  readonly ctx_copy: (a: number) => number;
  readonly ctx_reset: (a: number) => void;
  readonly ctx_next: (a: number) => number;
  readonly ctx_wasm_length: (a: number) => number;
  readonly __wbg_ctx_free: (a: number, b: number) => void;
  readonly trade_wasm_size: (a: number) => number;
  readonly trade_wasm_entry: (a: number) => number;
  readonly trade_wasm_exit: (a: number) => number;
  readonly trade_wasm_pnl: (a: number) => number;
  readonly trade_wasm_direction: (a: number) => number;
  readonly trade_wasm_is_active: (a: number) => number;
  readonly trade_wasm_is_closed: (a: number) => number;
  readonly tradeevent_wasm_id: (a: number) => [number, number];
  readonly tradeevent_wasm_order_bar_index: (a: number) => number;
  readonly tradeevent_wasm_fill_bar_index: (a: number) => number;
  readonly tradeevent_wasm_price: (a: number) => number;
  readonly tradeevent_wasm_comment: (a: number) => [number, number];
  readonly tradedirection_Long: (a: number) => number;
  readonly tradedirection_Short: (a: number) => number;
  readonly tradedirection_toNumber: (a: number) => number;
  readonly tradedirection_fromNumber: (a: number) => number;
  readonly __wbg_tradedirection_free: (a: number, b: number) => void;
  readonly timeframe_toString: (a: number) => [number, number];
  readonly timeframe_fromString: (a: number, b: number) => number;
  readonly timeframe_Years: (a: number) => number;
  readonly timeframe_Months: (a: number) => number;
  readonly timeframe_Weeks: (a: number) => number;
  readonly timeframe_Days: (a: number) => number;
  readonly timeframe_Hours: (a: number) => number;
  readonly timeframe_Minutes: (a: number) => number;
  readonly timeframe_Seconds: (a: number) => number;
  readonly timeframe_Ticks: (a: number) => number;
  readonly timeframe_Ranges: (a: number) => number;
  readonly timeframe_Unknown: () => number;
  readonly timeframe_wasm_years: (a: number) => number;
  readonly timeframe_wasm_months: (a: number) => number;
  readonly timeframe_wasm_weeks: (a: number) => number;
  readonly timeframe_wasm_days: (a: number) => number;
  readonly timeframe_wasm_hours: (a: number) => number;
  readonly timeframe_wasm_minutes: (a: number) => number;
  readonly timeframe_wasm_seconds: (a: number) => number;
  readonly timeframe_wasm_ticks: (a: number) => number;
  readonly timeframe_wasm_ranges: (a: number) => number;
  readonly timeframe_wasm_unknown: (a: number) => number;
  readonly timeframe_eq: (a: number, b: number) => number;
  readonly timeframe_toDurationS: (a: number) => [number, number, number];
  readonly timeframe_fromDurationS: (a: number) => number;
  readonly __wbg_timeframe_free: (a: number, b: number) => void;
  readonly __wbg_trade_free: (a: number, b: number) => void;
  readonly __wbg_tradeevent_free: (a: number, b: number) => void;
  readonly __wbg_ohlcvbar_free: (a: number, b: number) => void;
  readonly _getCoreVersion: () => [number, number];
  readonly returns: (a: number, b: number, c: number) => [number, number];
  readonly stdev: (a: number, b: number) => number;
  readonly variance: (a: number, b: number) => number;
  readonly mean: (a: number, b: number) => number;
  readonly sum: (a: number, b: number) => number;
  readonly f1: (a: number, b: number) => number;
  readonly precision: (a: number, b: number) => number;
  readonly accuracy: (a: number, b: number, c: number, d: number) => number;
  readonly grossLossPct: (a: number, b: number) => number;
  readonly omegaRatioFromReturns: (a: number, b: number, c: number) => number;
  readonly omegaRatio: (a: number, b: number, c: number) => number;
  readonly sortinoRatioFromReturns: (a: number, b: number, c: number) => number;
  readonly sharpeRatioFromReturns: (a: number, b: number, c: number) => number;
  readonly avgWinLossRatio: (a: number, b: number) => number;
  readonly avgLosingTrade: (a: number, b: number) => number;
  readonly winRate: (a: number, b: number) => number;
  readonly longNetProfitRatio: (a: number, b: number) => number;
  readonly pnl: (a: number, b: number, c: number) => number;
  readonly expectancyScore: (a: number, b: number) => number;
  readonly expectancy: (a: number, b: number) => number;
  readonly profitFactor: (a: number, b: number) => number;
  readonly recall: (a: number, b: number) => number;
  readonly sortinoRatio: (a: number, b: number, c: number) => number;
  readonly sharpeRatio: (a: number, b: number, c: number) => number;
  readonly shortNetProfitPct: (a: number, b: number) => number;
  readonly longNetProfitPct: (a: number, b: number) => number;
  readonly grossProfitPct: (a: number, b: number) => number;
  readonly netProfitPct: (a: number, b: number) => number;
  readonly avgWinningTrade: (a: number, b: number) => number;
  readonly avgTrade: (a: number, b: number) => number;
  readonly orderSizeForEquityPct: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
  readonly orderSize: (a: number, b: number, c: number, d: number, e: number) => number;
  readonly validateContracts: (a: number, b: number) => number;
  readonly roundContracts: (a: number, b: number, c: number) => number;
  readonly roundToMinTick: (a: number, b: number) => number;
  readonly backtestsummary_print: (a: number) => void;
  readonly backtestsummary_toJSON: (a: number) => any;
  readonly __wbg_backtestsummary_free: (a: number, b: number) => void;
  readonly backtest_wasm_new: (a: number, b: number, c: number, d: number) => number;
  readonly backtest_wasm_initial_capital: (a: number) => number;
  readonly backtest_wasm_process_orders_on_close: (a: number) => number;
  readonly backtest_wasm_ctx: (a: number) => number;
  readonly backtest_wasm_equity: (a: number) => number;
  readonly backtest_wasm_net_equity: (a: number) => number;
  readonly backtest_wasm_equity_list: (a: number) => [number, number];
  readonly backtest_wasm_net_equity_list: (a: number) => [number, number];
  readonly backtest_wasm_pnl_list: (a: number) => [number, number];
  readonly backtest_wasm_open_profit: (a: number) => number;
  readonly backtest_wasm_net_profit: (a: number) => number;
  readonly backtest_wasm_gross_profit: (a: number) => number;
  readonly backtest_wasm_gross_loss: (a: number) => number;
  readonly backtest_wasm_position_size: (a: number) => number;
  readonly backtest_wasm_trades: (a: number) => [number, number];
  readonly backtest_onBarOpen: (a: number) => void;
  readonly backtest_onBarClose: (a: number) => void;
  readonly backtest_signal: (a: number, b: number) => void;
  readonly backtest_signalList: (a: number, b: any) => void;
  readonly backtest_signalMap: (a: number, b: any) => void;
  readonly backtest_skip: (a: number, b: number) => void;
  readonly backtest_length: (a: number) => number;
  readonly backtest_next: (a: number) => number;
  readonly backtest_toPine: (a: number) => [number, number];
  readonly backtest_summary: (a: number, b: number, c: number) => number;
  readonly __wbg_backtest_free: (a: number, b: number) => void;
  readonly __wbindgen_exn_store: (a: number) => void;
  readonly __externref_table_alloc: () => number;
  readonly __wbindgen_export_2: WebAssembly.Table;
  readonly __wbindgen_malloc: (a: number, b: number) => number;
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
  readonly __externref_table_dealloc: (a: number) => void;
  readonly __externref_drop_slice: (a: number, b: number) => void;
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
  readonly closure77_externref_shim: (a: number, b: number, c: any, d: any) => void;
  readonly __wbindgen_start: () => void;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;
/**
* Instantiates the given `module`, which can either be bytes or
* a precompiled `WebAssembly.Module`.
*
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
*
* @returns {InitOutput}
*/
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;

/**
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
* for everything else, calls `WebAssembly.instantiate` directly.
*
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
*
* @returns {Promise<InitOutput>}
*/
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
