Position.CurrentPrice
property · Position · cAlgo.API
DesktopCLICloud
Gets the position current market price. If Position's TradeType is Buy it returns Symbol current Bid price. If position's TradeType is Sell it returns Symbol current Ask price.
Definition
double CurrentPrice {get;}
position.CurrentPrice: float
Returns double
Examples
var position = Positions.Find("myLabel");
if (position != null)
Print("Entry {0}, current price {1}", position.EntryPrice, position.CurrentPrice);
position = api.Positions.Find("myLabel")
if position is not None:
api.Print(f"Entry {position.EntryPrice}, current price {position.CurrentPrice}")