from __future__ import annotations from src.trader_mcp.strategy_sdk import Strategy class Strategy(Strategy): CONFIG_SCHEMA = { "label": {"type": "string", "default": "hello world"}, } def init(self): return {"counter": 0} def on_tick(self, tick): self.state["counter"] += 1 return self.state["counter"] def render(self): return { "widgets": [ {"type": "text", "label": "message", "value": self.config.get("label", "hello world")}, {"type": "metric", "label": "ticks", "value": self.state["counter"]}, ] }