Hi!
I have this situation in my ledger:
```
2013/11/09 Foo
Broker 3 Foo {10.00 USD} @ 10.00 USD
Dummy
2016/11/09 Foo
Broker 5 Foo {100.00 USD} @ 100.00 USD
Dummy
; Adjust the price to have a mean value of the asset
2017/03/28 Foo
Broker 8 Foo {66.25 USD} @ 66.25 USD
Broker -3 Foo {10.00 USD} @ 10.00 USD
Broker -5 Foo {100.00 USD} @ 100.00 USD
; Move some of this asset somewhere else
2017/03/29 Foo
Other 4 Foo {66.25 USD}
Broker
P 2017/12/04 Foo 1000.00 USD
```
When I want to see the current value in Broker, I can do
$ ledger -f ledger.dat bal -X USD Broker
4000 USD
When I want to see the initial value (=cost?) in Broker, I can do:
$ ledger -f ledger.dat bal -I -X USD Broker
265 USD
>From there, I’m looking for a flag that would permit me to get the expected
(unrealized) gain, i.e. 3735 USD
I though that --unrealized would do that, but:
$ ledger -f ~/prive/notes/A_Traiter/Ledger_gain.txt bal --unrealized -X USD
Broker
```
4000 USD Broker
-3870 USD Equity:Unrealized Gains
--------------------
130 USD
```
First the value is wrong, then I find no way of getting *only* 3735 USD,
the only way I find to get it is a line in the middle of a balance so I
cannot make use of it...
When I don’t have the 2017/03/29 post, then the --unrealized command
shows a correct information, but I still don’t see how I can obtain only
the unrealized gain.
Any hint?
Kind regards,
--
Ismael
--
---
You received this message because you are subscribed to the Google Groups
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ledger-cli/20201019105328.wm5zmv7iry242rtb%40dilion.
signature.asc
Description: PGP signature
