[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rounding to nearest tick



PureBytes Links

Trading Reference Links

At 11:34 AM 11/4/2005, Bob R wrote:

>Is there a function or convenient piece of code to round a calculation to 
>the nearest tick?  For example in calculating support or resistance levels 
>what would the .ELS code be to round to the nearest 0.00, 0.25, 0.5, 0.75 
>for the ES?

It should be:

  Input: Price(NumericSimple);

  Var: tic(MinMove/PriceScale);

  RoundToTic = Round(Price / tic, 0) * tic;



Bob Fulks