Display on chart the real profit/loss (including swaps and commisions)
-
Hi guys,
I have a little problem with a comment on chart. I would like to display the "real" global profit on each tick in money. If I set in the variable "profit (equity - balance)" I get the gross number: of course, swaps and commisions are not included. I'd like to have the "net" value.
Instead if I set it as the image below it seems that the number is not correct.
Do you have some advice to make it using the "modify variable" block? Or I have to change that block and create a formula to extract the net profit/loss including commissions and swaps?Thanks in advance!

-
@pinoa Hello, I believe that what is missing there is a pink block called "For each Trade" linked to the "variable" block.
But remembering here, if I'm not mistaken I've already had problems with a logic similar to yours because in the end swap and commissions weren't computed, I believe that Fxdreema couldn't include, otherwise I started to use in my logic " Bucket of Positions " and I started to have the net value already with everything calculated.
I only noticed when I used it to close trades with "profit", when I used For each positions it always at some point closed some trades losing money, while the bucket of positions closed positively. -
Hello @ontradingx , thanks for the hints!
Unfortunately a "For each Trade" block linked on top of "Modify variables" does not work and neither the "Bucket of trades". With both of them the comment does not appear on chart. I tried this other way, but I can't trust the result as the net profit, it's not that.
@l-andorrà have you ever faced this subject?

-
@pinoa Your fisrt option was correct and you definitely ned the 'For each trade' block on top to make it work.
-
Thank you @l-andorrà!
I tried that way one more time but it does not work.
I trade manually and I have others EAs running, so I think the group mode of the "for each trade" block should be "All...", so that the sum can include the global profit/loss...
Here is the project: https://fxdreema.com/shared/y9N2Et09d -
@pinoa That's correct. Selection the 'All trades...' options the block will manage those manually opened too.