Round Variable
-
Hi Folks,
Im trying to round a variable, I've created. Can you help me? Is there a build-in feature of Dreama, which can do this for me or do I have to use NormalizeDouble (double Wert, int Ziffern). When I have to use the formula, where I have to put it? Assume, I take a "modify variable" and put something in it. In this case the money per Tick - how can I say, I only want 2 Numers behind the . ? (y,xx)Thanks!!!!
Philipp
-
try this calculation with Custom code:

variable1 is your variable to be rounded, roundDigits is on how much digits it should be rounded (0 is not allowed) ... I have not tried it, maybe it is not working or some mistake can be in code ...
-
Thanks a lot for your help, it works fine for me. It's nice, because you can change the number of rounding digits.
but I found another way to shorten die Variable to 2 Digits with only the DoubleNormalization. I just want to share it as an Alternative to your explizit way!
Thanks again for your fast response!

-
ah yea, I understood your question badly, I though, that NormalizeDouble is not working for you, now I understood
