This is a professional expert system, which implements the strategy of trading using neural networks. Machine learning is widely used in various fields and is intended to replace human brain for solving complex problems of classification and prediction. The markets change, which entails the need to constantly modify strategies. The neural network allows you to get rid of a constant strategy change, since the system can simply be retrained for the current market situation.
In this case, the configuration of the neural network is very simple. It uses MLP (multilayer perceptron) Multilayer Fully Connected Feedforward Networks. Training takes place during optimization. The neural network weights configuration is saved in the settings.
At the beginning of each new bar, the data from three indicators (Relative Strength Index (oscillator), Accumulation/Distribution (volume), Parabolic SAR (trend)) are sent to the neural network entries. Data from each indicator are normalized from 0 to 1. The best indicator for this task is Relative Strength Index, since it works within the interval 0-100, which means it is already normalized. This is an important factor for a proper forecast of the future price behavior by the neural network.
The two neural networks (for buying and for selling) work simultaneously. In case of a hedging account, they should be optimized separately. To do this, we should first enable buys only and optimize the parameters related to buying. Then, the same is done for selling. Trading in both directions is enabled in the final test.
The EA does not use dangerous strategies such as averaging or martingale, but strictly adheres to the neural network instructions. Each trade features stop loss and take profit. The EA correctly handles errors and reliably works with a deposit of 100-1000 USD. The EA has been tested on EURUSD. The default working timeframe is M15. Any other timeframe and currency pair can be used. The higher the timeframe, the better the predictability. The EA takes all the data from the timeframe it is launched at.
- TypeFilling - order execution policy;
- Magic - magic number;
- LimitTradesOptimization - limit the number of orders during optimization;
- OnBuy - only buy;
- OnSell - only sell;
- LimitSpread - spread limitation;
- Risk - calculate lot depending on a deposit. We recommend that you use Risk, rather than Lot;
- Lot - lot size for entering the market (priority is higher than the Risk field);
- LotExponent - ratio that defines the progressive lot increase;
- Losses - set a stop loss depending on the total volume in the market (the larger the volume, the tighter the stop loss);
- DrawDown - maximum drawdown, at which closing occurs (in % of a deposit);
- ServerTimeFilter, StartHour, StartMin, FinalHour, FinalMin, FridayOn - limit operation time within a day;
- LevelStart - level of entering the market by the neural network signal - for an initial position;
- LevelAdd - level of entering the market by the neural network signal - for subsequent positions.
The settings are paired for buying and selling:
- BuyIndicatorA, BuyIndicatorB, BuyIndicatorC - three indicators for analyzing buying;
- wb0 - wb11 - neural network weights (these are the settings that keep the neural network logic in the set file itself) for buying;
- BuyTP, BuySL - stop levels - stop loss and take profit for buying;
- BuyLimitGrid - limit the grid steps for buying;
- BuyStepGrid - limit points between two adjacent buy orders;
- SellIndicatorA, SellIndicatorB, SellIndicatorC - three indicators for analyzing selling;
- ws0 - ws11 - neural network weights (these are the settings that keep the neural network logic in the set file itself) for selling;
- SellTP, SellSL - stop levels - stop loss and take profit for selling;
- SellLimitGrid - limit the grid steps for selling;
- SellStepGrid - limit points between two adjacent sell orders.