Skip to content

Position.EntryTime

property · Position · cAlgo.API

DesktopCLICloud

Entry time of trade associated with the position. The Timezone used is set in the cBot attribute.

Definition

DateTime EntryTime {get;}
position.EntryTime: DateTime

Returns DateTime

Examples

var position = Positions.Find("myLabel");
if (position != null)
    Print("Position open for {0}", Server.Time - position.EntryTime);
position = api.Positions.Find("myLabel")
if position is not None:
    api.Print(f"Position open for {api.Server.Time - position.EntryTime}")