bluehorseshoe 0 Report post Posted October 4, 2019 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) Thanks. Share this post Link to post
Physicsman 26 Report post Posted October 4, 2019 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