3. Validation and retraining control system
3.1. How validation works
3.2. Recommendations for setting up validation (10-20% of the number of examples is recommended)
4. Advanced settings
4.2. Additional parameters
4.3. Activation and scaling settings
- ActivationPreset – preset configurations of activation functions (Auto/Manual)
- ActivationTypeHidden – activation function for hidden layers (when configured manually)
- ActivationTypeOut – activation function for the output layer (when configured manually)
- InputScale – input data scaling method (S11/S01)
- OutputScale – output data scaling method (S11/S01)
- GradientLimiting – Enable gradient limiting
- max_grad – maximum gradient value (with limitation enabled)
4.4 Notification and Logging Settings
- EnableAlerts – Enable trading alerts
- AlertThreshold – alert trigger threshold
- PushNotifications – sending push notifications
- EmailAlerts – Sending email alerts
- SoundAlerts – Sound Alerts
- EnableLogging – enabling the logging system
- ReduceLog – frequency of logging (reduction)
- LogExamples – logging training examples
- LogResults – logging of training results
- LogLoad – logging network loading
- LogSave – logging of network saving
4.5. Additional indicator settings
- UniverseOutputScale – universal output scaling
- FixIndicatorWindowMinMax – fixing the minimum/maximum of the indicator window
- MaxBars – maximum number of bars in the indicator window
- AutoColor – automatic color scheme
- Color – select color (when AutoColor is disabled)
5. Interpretation of results
5.1. Information panel (GUI)
- The information panel displays:
- Network structure – layer configuration (L1, L2, L3, L4)
- Accuracy – current assessment of the accuracy of forecasts
- Training period – the time range of data on which the network was trained
- Activations – activation functions used for hidden and output layers
- Scale type – the method of scaling input and output data (S01 [0,1] or S11 [-1,1])
5.2. Visual elements on the chart
- Forecast Line – a colored line that displays the forecast for the selected bar
- Graphic objects – visualization of future forecasts directly on the price chart
- Vertical lines – represent the period of data used to train the last loaded network
- Color indication – informs about the compatibility of the loaded network with the current symbol and timeframe
6. Integration with advisors (EA)
6.1 To call the indicator from the advisor, use the iCustom() function.
- Example of initialization in the advisor:
int OnInit()
{
// Loading the indicator
indicator_handle = iCustom(_Symbol, _Period, Indicator_Name, FutureBar, File_Name, 0);
if(indicator_handle == INVALID_HANDLE)
{
Alert(“Error loading the indicator: “, GetLastError());
return(INIT_FAILED);
}
return(INIT_SUCCEEDED);
}
6.2 Parameters for optimization in the strategy tester:
- Prediction Number (1 to 6)
- Threshold values for generating trading signals (SignalLimit)
- Network type (Versions) – T1, T2, T3, T4 and their modifications
- Sizes of neural network layers (LL1, LL2, LL3, LL4)
7. Frequently Asked Questions (FAQ)
Q: The network does not load or does not start training.
ABOUT:
- Check the write permissions in the MQL5/Files/ folder
- Make sure there is enough historical data available
- Check the correctness of the specified network parameters (layer sizes)
- Make sure the network files exist and are not corrupted.
Q: What Network type should I choose?
ABOUT:
- T1 – Basic option. It is recommended to start with it
- T1Dif, T2Dif – Strategies that analyze price differences. Can be more accurate for determining directional movements
- T2 – Context-dependent analysis. Takes into account volatility
- T3/T4 – Specialized strategies for accurate determination of trends and impulses
Q: How to determine the input/output scale type?
ABOUT:
- Check the Type parameter on the indicator information panel (GUI)
- If the UniverseOutputScale parameter = true, the display in the indicator window is standardized to the range [-1,1]
- If UniverseOutputScale = false, the output values correspond to the original scale of the selected strategy (S01 or S11)
Q: Why does the indicator use this particular validation method?
ABOUT:
- This approach is standard in machine learning and provides a fair assessment of the quality of the model on data that was not used in training.
Q: How often should the network be retrained?
ABOUT:
- It is recommended to retrain the network whenever market conditions change significantly or every 1-2 weeks to keep the model relevant.
8. Recommendations for use
- Determine the scale type – Understanding the scale of the output data (S01 or S11) is critical to properly interpreting the signals.
- Set up thresholds – Optimize the SignalLimit parameter to your trading strategy and selected timeframe
- Test different types of networks – Strategies based on price differences (T1Dif, T2Dif) can show better results on volatile instruments
- Consider the time frame – High time frames (H4, D1) often require more conservative (larger) thresholds to filter out noise
- Periodic retraining – Regularly retrain the network on new data to keep the model up to date
Important validation notes:
- The validation period is cut off from the end of the historical data.
- For maximum relevance, it is recommended to periodically retrain the network on new data.
- The validation period size should match your trading horizon.
9. Support
If you have any questions or problems:
- First of all, check the logs in the “Experts” and “Journal” tabs. Make sure that logging is enabled in the settings
- Make sure you have enough historical data for the symbol and timeframe you choose.
- Determine the type of network used and the data output scale – this information is often needed for diagnostics
- For complex questions, please contact the indicator’s discussion section on the Marketplace or the developer via private messages
APPENDIX A: Description of strategies (Network type) and recommendations for activation and scaling (implemented in Auto)
T1 – Normalized independent analysis
- Input: Normalized window of L1 opening prices
- Output: Normalized window of L4 predicted opening prices
- The gist: The neural network learns to directly predict future prices based on historical
- Activations: Tanh / Tanh
- Scale: S11 / S11
T2 – Context-dependent analysis
- Input: Normalized window of L1 opening prices
- Output: Predicted prices normalized to the range of input data
- The bottom line: The forecast is scaled relative to the current volatility
- Activations: Tanh / Tanh
- Scale: S11 / S11
T1Dif / T2Dif – Price Difference Analysis
- Input: Differences between future and current prices, normalized to preserve sign
- Output: Predicted price differences (T1Dif: independent norm., T2Dif: input norm.)
- The gist: The network predicts the direction and strength of movement, not the price
- Activations: Tanh (LReLu) / Linear
- Scale: S11 / S11
T3 – Trend Detector with Filtering
- Entry: Normalized Opening Price Window
- Output: If all L4 future bars are above/below the current price, their values are normalized. Otherwise, the output is ignored.
- The gist: The network learns to detect stable unidirectional movements
- Activations: Tanh / Sigm
- Scale: S11/S01
T3Bin – Binary Trend Classification
- Input: Same as T3
- Output: Binary values (1/-1 or 1/0) for each future bar
- Essence: Simplification of the problem to binary classification for clear signals
- Activations: Tanh / Sigm
- Scale: S11/S01
T4 – Pure Pulse Detector
- Entry: Normalized Opening Price Window
- Output: Similar to T3, but learning occurs only on pronounced movements
- The gist: Tighter selection. Focus on finding strong, momentum moves
- Activations: Relu / Tanh
- Scale: S11 / S11
T4Bin – Binary Impulse Classification
- Input: Same as T4
- Output: Binary values (1/-1 or 1/0)
- The gist: Extremely aggressive search for momentum for short trades
- Activations: Relu / Sigm
- Scale: S11/S01
For high timeframes (H4, D1, W1), it is recommended to set more conservative settings: if there was ActivationHidden == Relu, then set ActivationHidden = Tanh;
For low timeframes (M1, M5, M15) more aggressive settings: if ActivationHidden == Tanh, then set ActivationHidden = LRelu;
Summary table of recommendations:
Strategy | Hidden Activation | Output Activation | Input Scale | Output Scale |
---|---|---|---|---|
T1 | Tanh | Tanh | S11 | S11 |
T2 | Tanh | Tanh | S11 | S11 |
T1Dif | Tanh(LRelu) | Linear | S11 | S11 |
T2Dif | Tanh(LRelu) | Linear | S11 | S11 |
T3 | Tanh | Sigm | S11 | S01 |
T3Bin | Tanh | Sigm | S11 | S01 |
T4 | Relu | Tanh | S11 | S11 |
T4Bin | Relu | Sigm | S11 | S01 |
APPENDIX B – Recommendations for instruments and periods (in Manual mode):
- For volatile instruments (Crypto, Gold):
- More aggressive activations.
- For example for “BTCUSD”, “XAUUSD”
- ActivationHidden = Relu; or LRelu;
- OutputScale = S11; // full range
- For low volatility instruments (Major FX):
- More conservative settings.
- For example for “EURUSD” or “USDJPY”
- ActivationHidden = Tanh; // smooth activations;
- OutputScale = S01; // probabilistic output
- For different timeframes:
- High TF (H4, D1) – more conservative
- ActivationHidden = Tanh;
- ActivationOut = Tanh;
- Low TF (M1, M5) – more aggressive
- ActivationHidden = Relu;
- ActivationOut = Linear;
APPENDIX C – Strategy and Activation Presets Compatibility Table
Legend:
- ✅ Recommended – Perfect match
- ⚡ Alternative – Good alternative
- 🔄 Compatible – Works, but not optimally
- ❌ Not recommended – Bad combination
Key recommendations:
For T1 (Normalized Analysis):
-
Better: Standard, Asym_Output
-
Good: Classic, Mixed_Asym
For T1Dif (Difference Analysis):
-
Better: Regression, Relu_Regression, Lrelu_Linear
-
Avoid: Classic, Mixed_Asym
For T2Dif (Context-Aware Difference Analysis):
- Better: Regression, Lrelu_Linear, Relu_Regression
- Avoid: Classic, Mixed_Asym, Asym_Output
For T2 (Context-Aware):
-
Better: Standard, Asym_Output, Mixed_Asym
-
Good: Classic, Regression, Relu_Regression
For T3/T3Bin (Trend Detection):
-
Better: Classic, Asym_Output, Mixed_Asym
-
Avoid: All Linear outputs
For T4/T4Bin (Momentum):
-
Better: Relu_Regression, Lrelu_Linear, Relu_Network
-
Avoid: Classic, Mixed_Asym
Simplified recommendations:
For beginners:
For experienced:
For experts:
APPENDIX D – Recommendations for the application of strategies in various markets:
Summary table of recommendations:
Strategy | Best Markets | Good markets | Not recommended | Peculiarities |
---|---|---|---|---|
T1 | Forex Majors, Indices CFD | Metals, Commodities | Crypto CFD | Universal for stable markets |
T2 | Forex Crosses, Metals | Forex Majors, Indices CFD | Crypto CFD | For instruments with pronounced levels |
T1Dif | Crypto CFDs, Commodities | Forex Minor, Metals | Forex Major | For volatile and trending markets |
T2Dif | Forex Crosses, Metals | Indices, FX Major | Crypto CFD | For context-sensitive analysis of price differences |
T3 | Forex Majors, Indices CFD | Metals, Commodities | Crypto CFD | For clear trend movements |
T3Bin | All markets (training) | – | – | Universal binary classification |
T4 | Crypto CFDs, Commodities | Forex Minor, Metals | Forex Major | For strong impulse movements |
T4Bin | Crypto CFDs, USA Stocks CFDs | Commodities, Metals | Indicatives | For aggressive momentum strategies |
Detailed market recommendations:
1.T1 – Normalized Independent Analysis
-
Forex Major (EURUSD, GBPUSD, USDJPY): ✅ Excellent – stable trends
-
Forex Minor (EURAUD, GBPNZD): ✅ Good – moderate volatility
-
Metals (XAUUSD, XAGUSD): ✅ Good – clear trends
-
Indices CFD (US30, SPX500): ✅ Excellent – suitable for indices
-
Commodities (XBRUSD, XNGUSD): ✅ Good – but needs adaptation
-
Crypto CFD (BTCUSD, ETHUSD): ⚠️ Caution – too volatile
-
USA Stocks CFD (AAPL, TSLA): ✅ Good – for stocks with liquidity
2. T2 – Context-Aware Normalized Analysis
-
Forex Crosses (EURGBP, AUDCAD): ✅ Excellent – good levels
-
Metals (XAUUSD, XPTUSD): ✅ Excellent – clear technical levels
-
Indices CFD (DAX30, FTSE100): ✅ Good – but there may be gaps
-
Forex Major: ✅ Good – but less pronounced levels
-
Commodities: ⚠️ Conditional – depends on the specific product
3. T1Dif – Price Difference Analysis
-
Crypto CFD: ✅ Ideal – high volatility
-
Commodities (Oil, Gas): ✅ Excellent – sharp movements
-
Forex Minor (exotic pairs): ✅ Good – high volatility
-
Metals (XAUUSD): ✅ Good – during news
-
Forex Major: ⚠️ Conditionally – only during periods of high volatility
4. T2Dif – Context-Aware Difference Analysis
- ✅ Forex Crosses (EURGBP, AUDCAD, EURCHF) – the best choice
- ✅ Metals (XAUUSD, XAGUSD) – especially in the Asian session
- ✅ Indices CFD (DAX30, FTSE100) – on daily timeframes
- ⚠️ Forex Major (EURUSD, GBPUSD) – only during periods of high volatility
- ❌ Crypto (too volatile)
5. T3 – Trend Detection with Filtering
-
Forex Major: ✅ Ideal – stable trends
-
Indices CFD: ✅ Excellent – clear daily trends
-
Metals: ✅ Good – especially gold
-
Commodities: ✅ Good – trending movements
-
Crypto CFD: ⚠️ Beware – Too Noisy for T3
6. T3Bin – Binary Trend Classification
-
All markets: ✅ Universal – for training and testing
-
Especially: Forex Major, Indices – for reliable signals
-
For Beginners: Best Choice to Start With
7. T4 – Pure Momentum Detection
-
Crypto CFD: ✅ Ideal – strong impulses
-
Commodities: ✅ Excellent – sharp movements on news
-
Forex Minor: ✅ Good – volatile pairs
-
Metals: ✅ Good – especially silver
-
Forex Major: ⚠️ Only during periods of high volatility
8. T4Bin – Binary Momentum Classification
-
Crypto CFD: ✅ Ideal – for scalping
-
USA Stocks CFD: ✅ Excellent – High Volatility Stocks
-
Commodities: ✅ Good – for news impulses
-
Metals: ✅ Good – gold during crises
-
Indicatives: ❌ Not recommended – low volatility
APPENDIX E – Timeframe Recommendations:
For Forex Major:
For Crypto CFDs:
-
T1Dif, T4, T4Bin: M5, M15, H1
-
T3: H4, D1 (for long-term trends)
For Indices CFD: For Commodities:
-
T1Dif, T4: M15, H1
-
T3: H4, D1
Special recommendations:
Asian session (Forex):
-
T1, T2 – for range of motion
-
Avoid T4, T4Bin – low volatility
European/American session:
-
T3, T4 – for trend movements
-
T1Dif – for breakout strategies
News events:
-
T4, T4Bin – for capturing pulses
-
Avoid T3 – the filter can cut off sudden movements
Periods of low liquidity:
-
T1, T2 – more stable operation
-
Avoid T1Dif, T4 – may be false signals
Cross-market recommendations:
-
Start with Forex Major + T3Bin – the most stable option
-
For training use T3Bin on different markets – universal strategy
-
For aggressive trading: Crypto CFD + T4Bin – high volatility
-
For conservative trading: Indices CFD + T1 – stable trends
APPENDIX F – Recommendations for setting up neural network architecture:
Timeframe settings:
1. Short timeframes (M1-M15)
-
Input layer (L1): 12-15 neurons – short price history
-
Hidden layer 1 (L2): 8-10 neurons – compact processing
-
Hidden Layer 2 (L3): 0 – usually not required
-
Output layer (L4): 3-4 neurons – short-term forecast
2. Medium timeframes (M30-H1)
-
L1: 20-25 neurons – average history
-
L2: 12-15 neurons – balanced processing
-
L3: 0 – can be added if necessary
-
L4: 5-6 neurons – medium term prognosis
3. Daily timeframes (H4)
-
L1: 30-35 neurons – extended history
-
L2: 16-20 neurons – deep processing
-
L3: 8-10 neurons – additional hidden layer
-
L4: 8-10 neurons – long-term prognosis
4. Weekly and monthly timeframes
-
L1: 40-50 neurons – maximum history
-
L2: 20-25 neurons – high capacity
-
L3: 12-15 neurons – deep architecture
-
L4: 10-12 neurons – extended prognosis
Strategy-specific settings:
For T1Dif and T4 (analysis of price differences)
For T3Bin and T4Bin (binary classification)
-
Simplify architecture: L3 = 0
-
Reduce L2 by 2-3 neurons (minimum 6)
-
Optimal for fast learning and clear signals
For T2 and T2Dif (context-sensitive analysis)
-
Increase L2 by 2-3 neurons for better context
-
If L3 is present, increase by 2 neurons
-
Improves pattern and level recognition
Adaptation to instrument volatility:Highly volatile instruments (crypto, commodities)
-
Increase L1 by 3-5 neurons
-
Increase L2 by 2-3 neurons
-
Improves the network’s ability to handle sudden movements
Low volatility instruments (major pairs)
APPENDIX G – Gradient Limiting Recommendations for Each Activation Preset:
- Standard (Tanh-Tanh) GradientLimiting = false; // Tanh is resistant to gradient explosion
- Classic (Sigma-Sigma) GradientLimiting = false; // Sigmoid is self-limiting
- Lrelu_Linear (LReLU-Linear) GradientLimiting = true; max_grad = 0.1; // Default value for LReLU
- Bin_Momentum (ReLU-Sigma) GradientLimiting = true; max_grad = 0.08; // Stricter limitation for binary classification
- Asym_Output (Tanh-Tanh asymmetric) GradientLimiting = false; // Tanh is safe
- Relu_Network (ReLU-ReLU) GradientLimiting = true; max_grad = 0.1; // Required for pure ReLU
- Regression (Tanh-Linear) GradientLimiting = false; // Tanh + Linear are usually stable
- Mixed_Asym (Tanh-Sigma) GradientLimiting = false; // Both functions are safe
- Standard_Alt (Tanh-Tanh alternative) GradientLimiting = false; // Tanh is safe
- Relu_Regression (ReLU-Linear) GradientLimiting = true; max_grad = 0.12; // ReLU requires limiting
- LRelu_Network (LReLU-LReLU) GradientLimiting = true; max_grad = 0.1; // LReLU is better with limiting
- Full_Linear (Linear-Linear) GradientLimiting = true; max_grad = 0.15; // Linear activations are prone to exploding gradients
- Hybrid (Sigma-Tanh) GradientLimiting = false; // Both functions are safe
- Relu_Sigmoid (ReLU-Sigmoid) GradientLimiting = true; max_grad = 0.1; // ReLU requires limiting
- Combo_Relu_Tanh (ReLU-Tanh) GradientLimiting = true; max_grad = 0.1; // ReLU requires limiting
- Experimental (Sigma-Linear) GradientLimiting = false; // Sigmoid is safe
- Combo_LRelu_Tanh (LReLU-Tanh) GradientLimiting = true; max_grad = 0.1; // LReLU is better with limiting
- Combo_Tanh_Sigm (Tanh-Sigm) GradientLimiting = false; // Both functions are safe
Note: The indicator uses historical data to make predictions. Past performance does not guarantee future profits. Trade responsibly.