I am trying to figure out how to get the current price (DAX/GER30 with 2 decimals i.e 12263.71) and convert it to the next closest round number up/or down that ends in 00,25,50 or 75 -> 12275.00
I am trying with:
bidAsInt = MathFloor((Bid/Point)/100);
But this only returns 12263. Scratching my head now on how to get this rounded up to -> 12275.00 or down to -> 12250.00
Any help is greatly appreciated, thank you.
Seems I got it working with the part of the following code
double step = 25;
double pricerounded = DoubleToString(step * round(Bid / step),2);