feat: market event
This commit is contained in:
@@ -1088,7 +1088,7 @@ def _build_graph_json_from_spec(spec: dict) -> dict:
|
|||||||
nodes.append({
|
nodes.append({
|
||||||
"id": inter_id, "label": inter.get("label", inter_id),
|
"id": inter_id, "label": inter.get("label", inter_id),
|
||||||
"type": "intermediate", "x": x, "y": 175,
|
"type": "intermediate", "x": x, "y": 175,
|
||||||
"formula": f"{inp_id} * {coef_name}",
|
"formula": inp_id + " * {{" + coef_name + "}}",
|
||||||
})
|
})
|
||||||
edges.append({"from": inp_id, "to": inter_id,
|
edges.append({"from": inp_id, "to": inter_id,
|
||||||
"sign": "positive" if coef_val >= 0 else "negative", "style": "solid"})
|
"sign": "positive" if coef_val >= 0 else "negative", "style": "solid"})
|
||||||
@@ -1112,7 +1112,7 @@ def _build_graph_json_from_spec(spec: dict) -> dict:
|
|||||||
"id": out_id, "label": out.get("label", out_id),
|
"id": out_id, "label": out.get("label", out_id),
|
||||||
"type": "market_asset", "x": x, "y": 310,
|
"type": "market_asset", "x": x, "y": 310,
|
||||||
"unit": "pips", "instrument": out.get("instrument", "EURUSD"),
|
"unit": "pips", "instrument": out.get("instrument", "EURUSD"),
|
||||||
"formula": f"{from_id} * {coef_name}",
|
"formula": from_id + " * {{" + coef_name + "}}",
|
||||||
})
|
})
|
||||||
edges.append({"from": from_id, "to": out_id,
|
edges.append({"from": from_id, "to": out_id,
|
||||||
"sign": "positive" if coef_val >= 0 else "negative", "style": "solid"})
|
"sign": "positive" if coef_val >= 0 else "negative", "style": "solid"})
|
||||||
|
|||||||
Reference in New Issue
Block a user