Jump to content
Sign in to follow this  

Recommended Posts

How can I get the Unrealized P/L number  for a current trade?

Lightstreamer has a 25 second delay... even on the Forex app  masthead.

I need the number that changes as the prices changes.

If it is a calculation, what is it?

(see img below)

Capture.PNG.b0983e95299db9aa0e09ecbdab6c3cb3.PNG

Thanks.

Share this post


Link to post

Hi,

PnL For Buy Trades = ( (( INT(Current Price)*PFD)/100 + (Current Price - INT(Current Price)) ) - (( INT(Opening Price)*PFD)/100 + (Opening Price - INT(Opening Price)) ) ) * Quantity * (1/(BetPer * QCF))

PnL For Sell Trades = ( (( INT(Opening Price)*PFD)/100 + (Opening Price - INT(Opening Price)) ) - (( INT(Current Price)*PFD)/100 + (Current Price - INT(Current Price)) ) ) * Quantity * (1/(BetPer * QCF))

PFD = MarketInformation.PointFactorDivisor

BetPer = MarketInformation.BetPer

QCF = MarketInformation.QuantityConversionFactor

 

Kind Regards, PM

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×