I want to use the rounded EMA value in a strategy. If the EMA value of the current bar is equal to the value of the previous bar than an entry (long or short) is not allowed. But I want the EMA in that condition to be rounded to 2 numbers behind the point - like 121.25 instead of 121.2469857
I have seen things like using 'math.round' and 'round2ticksize' on the forum. However, in these posts there are no examples of what the programming should look like. Since I'm a newbie to programming, has anybody any ideas or an example?
Thanks in advance.
Comment