I’m trying to calculate 3rds in that swing and use “RoundToTickSize()” to round up to the nearest tick size. It rounds down 6934.33 to a value of 6934.25 !?
Please change the description in the NS manual, it’s misleading.
I’m trying to calculate 3rds in that swing and use “RoundToTickSize()” to round up to the nearest tick size. It rounds down 6934.33 to a value of 6934.25 !?
Please change the description in the NS manual, it’s misleading.
This is a crowdsourced forum. The official statement is that NT does not monitor this forum, so no one here can fulfil this request. ![]()
Yes, I know. My last request was also read by NT and the discussion closed. LOL
I guess the good news is that there was a response to your inquiry.
The old structure was so much better, it was more uncommon NOT to get a same day forum response from someone at NT. And since responses were on the forum it was searchable for everyone. ![]()
For me it always works, there’s a specific RoundDownToTickSize function already
Yes, I’m using that for the short side ![]()
I’m using now that here:
PB33[0] = Math.Ceiling(P33 / TickSize) * TickSize;
Yes, Math.Ceiling(price/stepsize) x stepsize and Math.Floor(price/stepsize) x stepsize are definitely valid syntax to round up/down to any step size.
However, I would still pass the result of that to RoundToTickSize() to make sure you don’t get floating point creep (25.25 → 25.250000000001). I learned this the hard way LOL.
Or just truncate it yourself.