Takes an existing value and rounds to the nearest low tick.
Namespace:
RightEdge.CommonAssembly: Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)
Syntax
| C# |
|---|
public static double RoundToNearestLowTick( double currentPrice, double tickSize ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function RoundToNearestLowTick ( _ currentPrice As Double, _ tickSize As Double _ ) As Double |
| Visual C++ |
|---|
public: static double RoundToNearestLowTick( double currentPrice, double tickSize ) |
Parameters
- currentPrice
- Type: System..::.Double
Current price value.
- tickSize
- Type: System..::.Double
Tick size. This is the smallest allowable increment of price movement for a contract.
Return Value
The rounded tick value.
Remarks
This is commonly used in futures contracts where the tick size is variable. Similar
to RoundToNearestTick, this will round the tick up with a low side bias. With S&P 500 futures
where the contract trades in $0.25 increments and the price of the underlying or a calculated
value does not fall within the tick increment, use this to push to the nearest lower tick. So
if a system were to request an open position and the S&P contract and the requested price
was $1000.23, the next lowest tick value would be $1000.00. This is useful in a situation
where a system may want to go long with the S&P and the highest price was $1000.23, but according
to the system, it should get filled and RoundToNearestTick would return $1000.25 resulting in
a non fill.