Skip to content

HistoricalTrade.EntryTime

property · HistoricalTrade · cAlgo.API

DesktopCLICloud

Time of the Opening Deal, or the time of the first Opening deal that was closed.

Definition

DateTime EntryTime {get;}
historicalTrade.EntryTime: DateTime

Returns DateTime

Examples

var trade = History.FindLast("myLabel");
if (trade != null)
    Print("Trade duration: {0}", trade.ClosingTime - trade.EntryTime);
trade = api.History.FindLast("myLabel")
if trade is not None:
    api.Print(f"Trade duration: {trade.ClosingTime - trade.EntryTime}")