Help to compare 61 variables at the end of trade
-
Good evening, friends from the forum. @fxDreema
I am Brazilian and I already apologize for the English. I'm writing through Google Translate.
My EA project here at Fxdreema is intended to look like a simple neural network (Perceptron).
Through indicators and candles, each CONDITION block assigns a value to a unique variable. The value can be 1 or -1.
I need help to find out at the end of the trade which variables were with negative numbers and which variables were positive.
Let's say the sum of the variables was> 0. In this case, I make a purchase.
If the trade is a winner: I want to see which variables were positive and increase their value. (Example: If it was 1, I want to change the value to 1.2)
I want to see which variables were negative and decrease their values. (Example: if it was 1, I want to change the value to 0.9)
I know what I can do with blocks. But you would have to compare 61 variables with 2 CONDITION blocks each (162 blocks). After that, use 162 more blocks of MODIFY VARIABLES.
My question is whether there is a more elegant solution in the CUSTOM MQL custom block to be implemented.
Obs. I am completely layman in MQL5 code. I don't know anything about programming.
-
Define an array like Indicator_Value[2,61], then go through this array with loop, quite easy.
-
@bocadeangu I'm not a programmer either so my help will be limited, I'm afraid.
The most efficient way is creating arrays to compare all those variables, but you will need custom code for that. Otherwise, I would need to take a look at the project to see if it can be improved.