forked from animatedread/Warrior_EA
The plateau/regression line printed balancedOosEra as the current value while comparing against m_bestBalancedOos, which has held the SELECTION score sincea142749. Two different metrics in one sentence, so HYBRID logged "regressed from best 14.4% to 34.0%" a hundred times - a regression to a higher number, which is not a thing. The comparison itself was right (selectionScore, coverage weighted, genuinely below best); only the print was wrong.1039ad9relabelled these strings but missed that this site passes the wrong variable. The startup config line had the same shape of gap: it printed the dense taper and called itself self-verifying while the DERIVED conv and recurrent stages - the ones that dominate CONV/LSTM/HYBRID - were invisible. It now shows the width into and out of each front-end stage, and flags the case where the dense stack is wider than the vector reaching it (a linear fan-out cannot recover what the bottleneck discarded; it only adds parameters). Flagged, not silently reshaped - that would re-key trained topologies mid-comparison. UsesConvStage()/UsesLstmStage() replace HasConvBeforeLstm() as the primitive, so each subclass declares its composition once and both the capacity budget and the config line derive from it rather than restating it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
60 lines
3.2 KiB
MQL5
60 lines
3.2 KiB
MQL5
//+------------------------------------------------------------------+
|
|
//| Warrior_EA |
|
|
//| AnimateDread |
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
#include "..\Expert\ExpertSignalAIBase.mqh"
|
|
// wizard description start
|
|
//+------------------------------------------------------------------+
|
|
//| Description of the class |
|
|
//| Title=Signals of indicator 'Convolutional AI' |
|
|
//| Type=SignalAdvanced |
|
|
//| Name=Convolutional AI |
|
|
//| ShortName=CONV |
|
|
//| Class=CSignalCONV |
|
|
//| Page=signal_conv |
|
|
//+------------------------------------------------------------------+
|
|
// wizard description end
|
|
//+------------------------------------------------------------------+
|
|
//| Class CSignalCONV. |
|
|
//| Purpose: Class of generator of trade signals based on |
|
|
//| the 'Convolutional AI Neural Network. |
|
|
//| Is derived from the CExpertSignalAIBase class. |
|
|
//| Only the network topology differs from the other AI signals: an |
|
|
//| input layer feeds a Conv+Pool stage before the common tapering |
|
|
//| hidden-layer stack (see AddCustomLayers). |
|
|
//+------------------------------------------------------------------+
|
|
class CSignalCONV : public CExpertSignalAIBase
|
|
{
|
|
protected:
|
|
virtual bool AddCustomLayers(CArrayObj *topology) override;
|
|
//--- keep in step with AddCustomLayers below - see the base declarations.
|
|
virtual bool UsesConvStage(void) const override { return true; }
|
|
public:
|
|
CSignalCONV(void);
|
|
//--- method of creating the indicator and timeseries
|
|
virtual bool InitIndicators(CIndicators *indicators) override;
|
|
};
|
|
//+------------------------------------------------------------------+
|
|
//| Constructor |
|
|
//+------------------------------------------------------------------+
|
|
CSignalCONV::CSignalCONV(void)
|
|
{
|
|
SetIdentity("Convolutional", "CONV");
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| Create indicators and bootstrap/load the network. |
|
|
//+------------------------------------------------------------------+
|
|
bool CSignalCONV::InitIndicators(CIndicators *indicators)
|
|
{
|
|
return InitNeuralNetwork(indicators);
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| Conv + Pool layers inserted between the input layer and the |
|
|
//| common tapering hidden-layer stack. |
|
|
//+------------------------------------------------------------------+
|
|
bool CSignalCONV::AddCustomLayers(CArrayObj *topology)
|
|
{
|
|
return AddConvStage(topology);
|
|
}
|
|
//+------------------------------------------------------------------+
|