[
  {"op": "source", "role": "price", "kind": "F64"},
  {"op": "add", "type": "SessionFrankfurt", "name": "sess", "bind": {"period_minutes": {"I64": 15}}},
  {"op": "feed", "role": "price", "into": ["sess.trigger"]},
  {"op": "add", "type": "EqConst", "name": "isfirst", "bind": {"target": {"I64": 0}}},
  {"op": "connect", "from": "sess.bars_since_open", "to": "isfirst.value"},
  {"op": "add", "type": "Const", "name": "one", "bind": {"value": {"F64": 1.0}}},
  {"op": "add", "type": "Const", "name": "zero", "bind": {"value": {"F64": 0.0}}},
  {"op": "feed", "role": "price", "into": ["one.clock", "zero.clock"]},
  {"op": "add", "type": "Select", "name": "flag"},
  {"op": "connect", "from": "isfirst.value", "to": "flag.cond"},
  {"op": "connect", "from": "one.value", "to": "flag.then"},
  {"op": "connect", "from": "zero.value", "to": "flag.otherwise"},
  {"op": "add", "type": "SMA", "name": "fast", "bind": {"length": {"I64": 3}}},
  {"op": "feed", "role": "price", "into": ["fast.series"]},
  {"op": "add", "type": "Sub", "name": "spread"},
  {"op": "connect", "from": "fast.value", "to": "spread.lhs"},
  {"op": "feed", "role": "price", "into": ["spread.rhs"]},
  {"op": "add", "type": "Sign", "name": "dir"},
  {"op": "connect", "from": "spread.value", "to": "dir.value"},
  {"op": "add", "type": "When", "name": "firstmom"},
  {"op": "connect", "from": "dir.value", "to": "firstmom.value"},
  {"op": "connect", "from": "isfirst.value", "to": "firstmom.gate"},
  {"op": "add", "type": "Bias", "name": "bias", "bind": {"scale": {"F64": 1.0}}},
  {"op": "connect", "from": "dir.value", "to": "bias.signal"},
  {"op": "expose", "from": "bias.bias", "as": "bias"}
]
