Deal.Closing
property · Deal · cAlgo.API Since 5.1
DesktopCLICloud
If deal was a closing deal then this property will return the deals that were closed by current deal.
Definition
IReadonlyList<Deal> Closing {get;}
deal.Closing: IReadonlyList[Deal]
Returns IReadonlyList<Deal>
Examples
var trade = History.FindLast("myLabel");
if (trade != null)
{
foreach (var openingDeal in trade.ClosingDeal.Closing)
Print("Closing deal closed opening deal {0} executed at {1}", openingDeal.Id, openingDeal.ExecutionPrice);
}
trade = api.History.FindLast("myLabel")
if trade is not None:
for openingDeal in trade.ClosingDeal.Closing:
api.Print(f"Closing deal closed opening deal {openingDeal.Id} executed at {openingDeal.ExecutionPrice}")