Position.NetProfit
property · Position · cAlgo.API
DesktopCLICloud
The Net profit of the position.
Definition
double NetProfit {get;}
position.NetProfit: float
Returns double
Examples
var position = Positions.Find("myLabel");
if (position != null && position.NetProfit > 100)
ClosePosition(position);
position = api.Positions.Find("myLabel")
if position is not None and position.NetProfit > 100:
api.ClosePosition(position)