Method SetThresholdPrice
- Namespace
- WhalesSecret.TradeScriptLib.Utils.Orders
- Assembly
- WhalesSecret.TradeScriptLib.dll
SetThresholdPrice(decimal)
Sets threshold price.
public OrderRequestBuilder<TOrderRequest> SetThresholdPrice(decimal price)
Parameters
price
decimalThreshold price to set.
Returns
- OrderRequestBuilder<TOrderRequest>
Builder to use in fluent syntax.
Remarks
Required for StopLossOrderRequest, StopLimitOrderRequest, TakeProfitOrderRequest and TakeProfitLimitOrderRequest.
Exceptions
- InvalidArgumentException
Thrown if:
price
is not strictly positive number, orTOrderRequest
is not any of: StopLossOrderRequest, StopLimitOrderRequest, TakeProfitOrderRequest, or TakeProfitLimitOrderRequest.