How can i display the right profit on chart?
-
Hello,can anyone advice how to display the profit from each bucket of trades on chart?
(In the below example is my effort but when i have more than 2 trades it does not show the total bucket profit.

-
@fxmich78 Do you mean open or closed trades?
-
@l-andorrà
I mean closed trades. -
@fxmich78 Can you please share you project?
-
-
@l-andorrà
I shared my project.
Any suggestions please? -
Hi @fxmich78 ,
I made a setup for you.
I used 'For each closed' block and some variables to collect profit of 'n' number of buy/sell trades.
Just a reminder; variables are kept in memory, so if the terminal restarts or EA re-initiates (not sure, did not tested) it flushes.
So this setup will calculate profit for 'n' number of closed buy/sell with commission & swaps until the variables flushed in above cases.

I hope it helps.
Regards.
notify: @l-andorrà
-
@paragorundu
First of all MANY THANKS!
I will try to make it and test it.I will get back for feedback.Thank you once again! -
Unfortunately i do not receive proper results..

-
@fxmich78 can you share the project?
-
@paragorundu
https://fxdreema.com/shared/OiWoLDize
here you are -
@fxmich78 ok I found it.
In your draw text block, you have to use 'ClosedTradesProfit' variable instead of 'ClosedTradesCount'.
Please update it and try again.
By the way, you can remove this:

-
F
fxmich78 36 minutes agoi am sorry,i used this also.
It does not work.
Actually,the screenshot with the minus profit is with ClosedTradesProfit. -
@fxmich78 you killed me bro!

Please apply the setup as I advised.
I found the difference. You used 'For each trade' instead of 'For each closed trade' block.
Things should start working properly.

-
-
NP @fxmich78
You're welcome. -
@paragorundu thank you. I am looking for such a solution too. Thanks
-
hi, how do i limit the profit to just 2 decimal place?
-
nevermind. solved.
just add "NormalizeDouble($,3) " in "adjust" within the text box block
-
sry, this didnt work accurately. when there are more than 1 position, where at least one is negative, the sum of the total profits would be inaccurate