Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Peceptron_Mult - MetaTrader 5 Expert | Forex Indicators Download - MT4/MT5 Resources

author EAcpu | 5 reads | 0 comments |

Idea from: Igor

Code mq5: Barabashkakon

This is a multi-symbol EA, that is, it works on three instruments at the same time: EURUSD ( symbol #1 ), GBPJPY ( symbol #2 ) and AUD/NZD ( symbol #3 ). Using a simple neural network (perceptron), it is adapted to the indicator iAC (Acceleration/Deceleration, Acceleration/Deceleration Oscillator, AC).

For optimization mode, you can disable certain symbols by assigning the non-existing symbol to a variable # .

Set position size

An unusual pattern is used in this EA to set the trading volume of a position: the minimum lot size is specified in the variable with the symbol # . Example: The minimum lot size is 0.1 symbol #1 and 0.01 symbol #2 , which is a tenfold difference. So, if the minimum lot size of the variable symbol # is set to 10 for both symbols, then 1.0 lots (0.1 x 10) of the position symbol #1 and 0.10 lots (0.01 x 10) of the symbol #2 will be opened.

perceptron module

On every new bar (when there is a new bar for all used symbols), an array ( large batch ) of indicator values ​​is assigned to the perceptron block of each symbol:

 //+------------------------------------------------------------------+
//|Perceptron|
//+------------------------------------------------------------------+
Double the perceptron ( double &bundle[], integer y1, integer y2, integer y3, integer y4)
  {
Double w1 = y1 - 100 ;
Double w2 = y2 - 100 ;
Double w3 = y3 - 100 ;
Double w4 = y4 - 100 ;
double a1 = array[ 0 ];
double a2 = array[ 7 ];
double a3 = array[ 14 ];
double a4 = array[ 21 ];
Return (w1 * a1 + w2 * a2 + w3 * a3 + w4 * a4);
  }


    I recommend optimizing each symbol continuously. First, symbol #1 is optimized, while symbol 2 #1 and symbol #3 are disabled. For all trading symbols, the setting range of parameter x is from 0 to 100, while sl (stop loss) and tp (profit) are set at your own discretion. Remember, to disable a symbol, just assign the changeable symbol # with the non-existent symbol.


    Attachment download

    📎 peceptron_mult.mq5 (42.07 KB)

    Source: MQL5 #22693

    Verification code Refresh