NinjaTrader Support Forum
>
NinjaScript Development Support
>
General Programming
> Round to Nearest Tick
PDA
View Full Version :
Round to Nearest Tick
tquinn
01-30-2007, 06:33 AM
In using double math, I'll sometimes get a number I'd like to display but it is between actual Ticks. Is there a method I can use which will round to the nearest tick?
NinjaTrader_Dierk
01-30-2007, 06:55 AM
Please try
Bars.Instrument.MasterInstrument.Round2TickSize(va lue)
tquinn
01-30-2007, 07:20 AM
Thanks,
I almost could have guessed that!