Fix sym shadowing warnings + coherent softmax gating

- Rename Init() param sym -> symName in IAgent base and overrides
  (MAAgent, MomentumAgent, RegimeADX) to stop hiding the global sym.
- Softmax gating: derive temperature from dispersion of the competence
  weights ws[] (the same quantity the softmax weights), not from the
  variance of signals zs[]; skip disabled agents in the normalization.
- Use |rho| (with weightMin floor) as competence and sign-flip
  anti-correlated agents instead of zeroing them, so rho<0 information
  is used (inverted) rather than discarded.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Pietro Giacobazzi
2026-06-14 18:20:19 +00:00
co-authored by Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 3256ebb5c6
commit a8b4a7d3ff
5 changed files with 37 additions and 24 deletions
@@ -39,8 +39,8 @@ public:
: IAgent(n, w), userPeriod(period), adxPeriod(0), adxHandle(INVALID_HANDLE),
lastADXPeriod(0), adxMinP(7), adxMaxP(30), prevZ(0) { signalStats.SetR(50.0); }
void Init(string sym, ENUM_TIMEFRAMES tf) override {
IAgent::Init(sym, tf);
void Init(string symName, ENUM_TIMEFRAMES tf) override {
IAgent::Init(symName, tf);
adxHandle = INVALID_HANDLE;
lastADXPeriod = 0;
}