MMTMMT Docs
Diagnostics

T405

invalid handler for this subscription

T405

The handler's target, event, parameters, or subscription option does not fit the data source it subscribes to. Use an event and parameter shape documented for that source.

Failing example

script "conf"

input exchanges = input.exchanges(["binancef"], title: "Ex")

type Venue {
  h1: OhlcvData
  n: float
}

setup venues = for ex in exchanges {
  Venue{ h1: subscribe(data.ohlcv, exchange: ex, timeframe: 1h), n: 1.0 }
}

plot out = plot.line(title: "out")

on venues.h2.close(v) { out.plot(1.0) }
on venues.n.close(v) { out.plot(1.0) }
on venues.h1.close { out.plot(1.0) }

Corrected example

script "fixed"
data chart = subscribe(data.ohlcv)
on chart.update { }

On this page