Square Root
-
A little late to this post - where would I find information on how to add a MQL4/MQL5 function? As I need to square certain values for a calculation.
-
I want to take the square root of a value
so I was wondering if anybody could show how to realize this ?I have one variable that I want to square root ith the number of open trades
So if my variable is 1.5
and open trades are 3the square root would be 1.51.51.5=3.375
the original MT4 function is MathSqrt I think
Thanks for your help
-
Yes, you can always use original MQL4 functions, everywhere. Otherwise there is nothing in fxDreema to make such conversions. I was wondering many times how to make something like that, how to make it completely visual, but I don't know... The thing is that you may want to do chain of conversions, and for each one of them there can be parameters (like when you round a number, how many digits to round). 1 block for square root, another one for rounding, another one for whatever - this is not a good way to do that, I think. Or is it?
-
@nachoboy You can use the greu 'Custom mql code' block and add it to any block tree you need. However, if you're not used to using it, you should try a smaller test bot with the function only before adding it to your global project.