Standard deviation of the variable
-
Is there any function that would allow to do some math operations on the variable so that the result would be return as another variable ? For example we have variable x, then we calculate standard deviation of x and we create new variable called 'STD_of_x' that reflects the value of standard deviation of x.
Would you guys know how to do that with custom script ? (I mean more like a framework for those type of calculations whether it's standard deviation, variance or any other math function). Thanks a lot !
-
Well, you can always create global variables from Variables panel. Then there is a block for custom MQL code (the last one in the list). To use the variables, simply write their name where it's needed. Or, some calculations can be made directly in the input fields of all blocks... depending on how simple the calculation is. In all input fields you can write MQL code. Well, it's a little bit different for "string" inputs, but still MQL is possible.