I'm currently working on a script that calculates stuff based on predefined levels. So I'm tacking the price and divide it by a configurable value and I want to get the integer value for this division. In C-code it would look like this:
newValue = (int)( close / divValue )
In Pinescript it will just make a typecast to float and the modulo-operator will just give me the remains of the division. Is there some way to make a typecast from float to integer or something like a reverse modulo?
Thanks in advance :)