feat(quant): Human-in-the-Loop Expert Trader Advisory & Dynamic Learning Engine
This commit is contained in:
@@ -177,6 +177,34 @@ class SMCScanner:
|
||||
"max": 15
|
||||
}
|
||||
|
||||
# 7. Expert Advisor Playbook Match (Bonus Confluence)
|
||||
matched_expert_strat = None
|
||||
try:
|
||||
from app.engine.expert_manager import expert_manager
|
||||
active_expert_strats = [s for s in expert_manager.list_strategies() if s.get("status") == "ACTIVE_WATCH"]
|
||||
for s in active_expert_strats:
|
||||
if s.get("direction") == ("BUY" if ema_trend_bullish else "SELL"):
|
||||
matched_expert_strat = s
|
||||
break
|
||||
if matched_expert_strat:
|
||||
score = min(100, score + 10)
|
||||
breakdown["expert_strategy_match"] = {
|
||||
"matched": True,
|
||||
"strategy_name": matched_expert_strat.get("name"),
|
||||
"author": matched_expert_strat.get("author_name"),
|
||||
"rules": matched_expert_strat.get("rules_bengali"),
|
||||
"points": 10,
|
||||
"max": 10
|
||||
}
|
||||
else:
|
||||
breakdown["expert_strategy_match"] = {
|
||||
"matched": False,
|
||||
"points": 0,
|
||||
"max": 10
|
||||
}
|
||||
except Exception as e:
|
||||
logger.debug(f"Expert strategy scan error: {e}")
|
||||
|
||||
is_a_plus_setup = (score >= self.min_confluence_score)
|
||||
|
||||
return {
|
||||
@@ -185,5 +213,6 @@ class SMCScanner:
|
||||
"threshold": self.min_confluence_score,
|
||||
"direction": "BUY" if ema_trend_bullish else "SELL",
|
||||
"breakdown": breakdown,
|
||||
"active_fvgs": fvgs[-3:] if fvgs else []
|
||||
"active_fvgs": fvgs[-3:] if fvgs else [],
|
||||
"matched_expert_strategy": matched_expert_strat
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user