Realized P/L  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
Smoky
Posts: 507
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 97 times
Been thanked: 115 times

Realized P/L

Postby Smoky » 15 Aug 2019

i try to find how to have Realized P/L from the broker , MC already have the information, i would like to find in PL.

auto-trading + manual trades in same chart.


MANUAL REALIZED TRADE.PNG
(15.99 KiB) Downloaded 265 times

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: Realized P/L  [SOLVED]

Postby Svetlana MultiCharts » 16 Aug 2019

Smoky,

In PowerLanguage one can access the information from Accounts tab of the Order and Position Tracker only.
Unfortunately, Realized P/L per position is not accessible from code.

User avatar
Smoky
Posts: 507
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 97 times
Been thanked: 115 times

Re: Realized P/L

Postby Smoky » 16 Aug 2019

thanks Svetlana






*CENSURED BY MODERATOR

User avatar
Smoky
Posts: 507
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 97 times
Been thanked: 115 times

Re: Realized P/L

Postby Smoky » 19 Aug 2019

Svetlana? not difficult to find

I only need to know P/L account realized,
then after every close trades i can know the difference before and after the last trade who should be last realized P/L ....

2 secondes thinking

today we only have account P/L unrealized from broker ...

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: Realized P/L

Postby Svetlana MultiCharts » 20 Aug 2019

Smoky,

Realized P/L per account is not supplied for any broker profile, except CQG (calculated locally).

You can use the following formula to calculate Realized P/L per position:
(exit price - entry price)*contracts*Big Point Value - for long
(entry price - exit price)*contracts*Big Point Value - for short
But the result of this calculation may vary from the value at the broker, because it doesn’t include commission.

Realized P/L per account can be calculated as a difference of Account Balance after and before the trade.
However, this method is not very accurate when there are multiple trades on various instruments.

User avatar
Smoky
Posts: 507
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 97 times
Been thanked: 115 times

Re: Realized P/L

Postby Smoky » 23 Aug 2019

Svetlana,

GetRTAccountNetWorth("XXXXXXXX"); seem to be the solution for me, accuracy is sufficient and better than nothing...


Return to “MultiCharts”