@josecortesllobat said in Block "formula" with more operands:
Here you are defining a variable "Y1" as a result of an math operation. Then, "Y1" value will change in function of the variables "A", "X1" and "B".
I am not sure what you mean with "Y1, A, X1 and B are changeable variables from other formulas blocks." "A", "X1" and "B" don't matter of where come. They might be a predefined variables or as a result of a formula block. But if "Y1" had a value before of that "Custom MQL code" block, Y1 value will shift to the result of the math operation.
Y1 = 10
A = 1
X1 = 2
B = 3
Y1 = 1*2+3 = 5
Before "Custom MQL code" block -> Y1 = 10
After "Custom MQL code" block -> Y1 = 5
Hope this helps.
Yeap, you got it! Thank you, worked with three operands (A*X1+B), but...
I made a little research about operands in /book.mql4.com/basics/expressions and figured out that is impossible to prioritize an addition value than a division, for an example:

And if I try "A=(Y1l-Y2l/X2l-X1l);" it would result first in Y2l/X2l , right?
So, in one hand Custom MQL Code it's a nice way to shrink sum of variables to one single block, like A1+A2+A3+A4 and so on...
In the other hand, Custom MQL Code doesn't work with simple equations like (A1+A2)/(A3+A4).
What's your opinion about that?
Thank you 