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:
co-authored by
Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
3256ebb5c6
commit
a8b4a7d3ff
@@ -37,8 +37,8 @@ public:
|
||||
|
||||
virtual ~IAgent() {}
|
||||
|
||||
virtual void Init(string sym, ENUM_TIMEFRAMES tf) {
|
||||
symbol = sym;
|
||||
virtual void Init(string symName, ENUM_TIMEFRAMES tf) {
|
||||
symbol = symName;
|
||||
timeframe = tf;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@ public:
|
||||
maHandle(INVALID_HANDLE), atrHandle(INVALID_HANDLE), lastMAPeriod(0), barCount(0),
|
||||
priceToMaCorr(0.1, 5), slopeCorr(0.1, 5), lastZ1(0), lastZ2(0) { signalStats.SetR(5.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);
|
||||
maHandle = INVALID_HANDLE;
|
||||
atrHandle = INVALID_HANDLE;
|
||||
lastMAPeriod = 0;
|
||||
|
||||
@@ -39,8 +39,8 @@ public:
|
||||
momHandle(INVALID_HANDLE), lastMomPeriod(0),
|
||||
lastZ1(0), lastZ2(0), momCorr(0.1, 5), accelCorr(0.1, 5) { signalStats.SetR(2.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);
|
||||
momHandle = INVALID_HANDLE;
|
||||
lastMomPeriod = 0;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user