Enum OrderType
- Namespace
- WhalesSecret.TradeScriptLib.Entities.Orders
- Assembly
- WhalesSecret.TradeScriptLib.dll
Order types options.
public enum OrderType
- Extension Methods
Fields
Limit = 0
Buy (sell) order which specifies maximum (minimum) price for which a specified volume of the asset should be bought (sold).
Market = 1
Buy (sell) order which specifies only volume to buy or sell.
StopLoss = 2
Stop-loss order has a certain threshold price and when this threshold price is reached, the order becomes Market order and it is filled immediately (unless there is no liquidity, of course).
Stop-loss orders help to limit potential losses when buying or selling assets.
People often use "stop" or "stop order" for short.
Typical example for use of this order type is: You buy 1 BTC at 15,000 USD/BTC and you speculate the price will get to 16,000 USD/BTC one day. However, the price fluctuates. The thing is you feel comfortable as long as the price does not get to 14,600 USD/BTC. So you put up StopLoss order at 14,600 USD/BTC so that the StopLoss order is converted to Market order once the price hits 14,600 USD/BTC. Unfortunately, your fill price may be lower than 14,600 USD/BTC because Market order does not specify any price. So when Bitcoin price volatility is high, you may get your StopLoss order filled at 14,400 USD/BTC, 13,000 USD/BTC, 1 USD/BTC etc. as no price is guaranteed. StopLimit for an alternative to StopLoss order.
StopLimit = 3
Stop-limit order has a certain threshold price and when the threshold price is reached, the order becomes Limit order with predefined limit price.
Stop-limit gives more control over final execution price but it is not guaranteed to be executed.
Typical example for use of this order type is: Bitcoin is trading at 16,000 USD/BTC. You expect some short-term downward movement of Bitcoin price. However, in the long term, you are bullish so you place StopLimit order with threshold 16,500 USD/BTC and the limit price 17,000 USD/BTC. So if 16,500 USD/BTC is reached, you will buy for any price up to 17,000 USD/BTC. However, it may happen that the price will get over 17,000 USD/BTC too fast and your order will not be executed due to other trading participants having similar orders or for other reasons.
TakeProfit = 4
Take-profit order has a certain threshold price and when this threshold price is reached, the order becomes Market order and it is filled immediately to close an existing position with a profit.
The profit is still not guaranteed when price heavily fluctuates or for many other reasons.
Typical example for use of this order type is: You have bought at 16,000 USD/BTC. Current price is 17,000 USD/BTC. You do not want to end up with a loss, so you want to close your position once price reaches 16,500 USD/BTC for a profit.
Note that you may still end up with a loss if, for example, there is not enough volume for you to sell at 16,500 USD/BTC price level.
TakeProfitLimit = 5
Take-profit limit order is similar to TakeProfit. The difference is that the order becomes Limit order instead of Market order.
Other = 6
An unsupported value.
Exchanges can support more OrderType options than Whale's Secret supports. Any such value will be mapped to this value.
User is not supposed to use this value in her code.