Compare commits

...

2 Commits

Author SHA1 Message Date
Pietro Giacobazzi bb670836e1 style: normalize indentation in Orchestrator.mqh via clang-format
Whitespace-only: consistent 3-space indentation throughout (was a mix of
3/4/5/6.. spaces). Repo conventions preserved: for(/if( spacing, access
labels, attached braces. Adds .clang-format so the style is reproducible
(run: clang-format -i --style=file <file>).

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-06-14 18:21:44 +00:00
Pietro Giacobazzi a8b4a7d3ff 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>
2026-06-14 18:20:19 +00:00
6 changed files with 1335 additions and 1254 deletions
+15
View File
@@ -0,0 +1,15 @@
BasedOnStyle: LLVM
IndentWidth: 3
TabWidth: 3
UseTab: Never
ColumnLimit: 0
BreakBeforeBraces: Attach
AllowShortFunctionsOnASingleLine: All
AllowShortBlocksOnASingleLine: Always
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
SortIncludes: false
SpaceBeforeParens: Never
IndentCaseLabels: true
AccessModifierOffset: -3
PointerAlignment: Right
@@ -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;
}
File diff suppressed because it is too large Load Diff