Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
@foxbat Did you select an integer variable type maybe? If so, you select a double type.
@foxbat Do you mean creating a 'custom code' block? You will need a programmer to do that. Otherwise you can try to find the appropriate timeframe to do the calculation within one bar of that timeframe, for example.