Takes an existing value and rounds to the nearest high tick.
Namespace:
RightEdge.CommonAssembly: Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)
Syntax
| C# |
|---|
public static double RoundToNearestHighTick( double currentPrice, double tickSize ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function RoundToNearestHighTick ( _ currentPrice As Double, _ tickSize As Double _ ) As Double |
| Visual C++ |
|---|
public: static double RoundToNearestHighTick( 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 tick value rounded up.
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 high 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 higher tick. So
if a system were to request an open position and the S&P contract and the requested price
was $1000.03, the next highest tick value would be $1000.25.