Position.TradeType
property · Position · cAlgo.API
DesktopCLICloud
Trade type (Buy/Sell) of the position.
Definition
TradeType TradeType {get;}
position.TradeType: TradeType
Returns TradeType
Examples
var position = Positions.Find("myLabel");
if (position != null)
Print("Trade type: {0}", position.TradeType);
position = api.Positions.Find("myLabel")
if position is not None:
api.Print(f"Trade type: {position.TradeType}")