Bucket - Problem
-
Hello Coders,
I have a problem with the bucket block. I am working with MT5 hedged mode.I am using it to find the average opening price of the opened positions. It works fine if I use the same lot size for all positions.
For example:
0.1 lot buy - 1.1200
0.1 lot buy - 1.1300
0.1 lot buy - 1.1400Average price = 1.1300
If I use differend lot sizes it calculates only the average price of the opening prices but not weighted.
0.1 lot buy - 1.1200
0.2 lot buy - 1.1300
0.3 lot buy - 1.1400Average result = 1.1300 but it should be 1.13333333
It there a solution for get a weighted average opening price?
Best regards,
Martin -
Yes, it's Average, not Weighted. I don't know, I never added such thing in any block. Maybe with a custom code. To be honest, I don't really know what is weighted average
