entryprice by position ID

Created at 04 Jun 2018, 13:34
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
alexander.n.fedorov's avatar

alexander.n.fedorov

Joined 02.01.2018

entryprice by position ID
04 Jun 2018, 13:34


Dear Panagiotis,

 

How do I find the entry price of a position if I know the positionID?

Regards, 

 

Alexander

 

 


@alexander.n.fedorov
Replies

PanagiotisCharalampous
04 Jun 2018, 14:16

Hi Sasha,

See below

            if (Positions.Count(x => x.Id == ID) > 0)
            {
                var entryPrice = Positions.First(x => x.Id == ID).EntryPrice;
            }

Best Regards,

Panagiotis


@PanagiotisCharalampous

alexander.n.fedorov
04 Jun 2018, 15:03

Entry price

Thank you, Panagiotis


@alexander.n.fedorov