HistoricalOrder.TradeType
property · HistoricalOrder · cAlgo.API Since 5.1
DesktopCLICloud
Order Trade type (buy or sell)
Definition
TradeType TradeType {get;}
historicalOrder.TradeType: TradeType
Returns TradeType
Examples
var buyOrders = HistoricalOrders.Count(order => order.TradeType == TradeType.Buy);
Print("Historical buy orders: {0}", buyOrders);
buyOrders = len([order for order in api.HistoricalOrders if order.TradeType == TradeType.Buy])
api.Print(f"Historical buy orders: {buyOrders}")