You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
deal Fellow:
While trying to learn about Neural Network and AI, I come across an article https://www.mql5.com/en/articles/12187.
I am trying to put most of the possible calculations within the CNeuralNet and remove them from EA_TradeNN.
I am using setup of CStategy --> CBaseExpert --> ExpertAdvisor.
I need guidance/help/support to move following codes from EA to CNeuralNet class "CNeuralNet *TrainNet(double &std)" and "CNeuralNet *LoadNet(const string filename, double &std, const int flags = FILE_COMMON)"
since the code has nested classes and no constructor seems to be called in EA, I am confused how to achieve my goal.
Currently I am getting following errors (StrategyNN.mqh), which seems because of in EA they are defined as global variable while in Class they are not. Even declaring them as public, did not help.
If I declare variables before class definition, at least I dont get "variable undeclared" error. However, I am not sure if this is correct practice? Also the code still remains in EA (or StrategyNN Class) instead of my goal to move it within NeuralNet Class.
'Reserve' - undeclared identifier StrategyNN.mqh 813 16
'SymbolCount' - undeclared identifier StrategyNN.mqh 813 25
'Depth' - undeclared identifier StrategyNN.mqh 813 37
'Reserve' - undeclared identifier StrategyNN.mqh 814 19
'Reserve' - undeclared identifier StrategyNN.mqh 818 15
'getPriceDelta' - undeclared identifier StrategyNN.mqh 820 8
'+' - some operator expected StrategyNN.mqh 820 23
'SymbolCount' - undeclared identifier StrategyNN.mqh 833 23
'getPriceVolatility' - undeclared identifier StrategyNN.mqh 836 21
'sSC' - undeclared identifier StrategyNN.mqh 836 40
'[' - array required StrategyNN.mqh 836 43
',' - unexpected token StrategyNN.mqh 836 52
'sSC' - some operator expected StrategyNN.mqh 836 40
'arrNPV' - semicolon expected StrategyNN.mqh 836 53
')' - unexpected token StrategyNN.mqh 836 59
expression has no effect StrategyNN.mqh 836 53
'HiddenLayerFactor' - undeclared identifier StrategyNN.mqh 864 34
'HiddenLayerFactor' - undeclared identifier StrategyNN.mqh 865 34
'HiddenLayerFactor' - undeclared identifier StrategyNN.mqh 866 112
'SpeedUp' - undeclared identifier StrategyNN.mqh 873 29
'SpeedDown' - undeclared identifier StrategyNN.mqh 873 37
'SpeedHigh' - undeclared identifier StrategyNN.mqh 873 47
'SpeedLow' - undeclared identifier StrategyNN.mqh 873 57
'DropOutPercentage' - undeclared identifier StrategyNN.mqh 875 21
'Epochs' - undeclared identifier StrategyNN.mqh 876 57
'Accuracy' - undeclared identifier StrategyNN.mqh 876 64
'Symbols' - undeclared identifier StrategyNN.mqh 888 75
implicit conversion from 'number' to 'string' StrategyNN.mqh 888 75
'Depth' - undeclared identifier StrategyNN.mqh 888 102
'Reserve' - undeclared identifier StrategyNN.mqh 889 25
'Epochs' - undeclared identifier StrategyNN.mqh 889 52
'Accuracy' - undeclared identifier StrategyNN.mqh 889 75
'HiddenLayerFactor' - undeclared identifier StrategyNN.mqh 890 25
'DropOutPercentage' - undeclared identifier StrategyNN.mqh 890 59
'TimeStamp' - undeclared identifier StrategyNN.mqh 903 34
'(datetime)' - some operator expected StrategyNN.mqh 903 44
implicit conversion from 'number' to 'string' StrategyNN.mqh 903 34
'+' - semicolon expected StrategyNN.mqh 903 97
'+' - illegal operation use StrategyNN.mqh 903 97
result of expression not used StrategyNN.mqh 904 40
'FrameFile' - undeclared identifier StrategyNN.mqh 920 6
'FrameLoss' - undeclared identifier StrategyNN.mqh 921 6
38 errors, 4 warnings 39 5
Hope I can get some guidelines or help to progress further.
Regards
Complete code is attached as Zip file. StrategyNN.mql will not compile as it is part of other classes.
However, EA_TradeNN.q5 can be complied and can be tested.