How To Calculate Position Prices of Multiple Orders ? New comment Johnny 2011.08.09 12:14 Hi all,let's say, i made multipe transaction below: Buy 500,000 AUDUSD at 1.03756 Buy 500,000 AUDUSD at 1.03726 Buy 1,000,000 AUDUSD at 1.03856 Buy 500,000 AUDUSD at 1.02362 Buy 100,000 AUDUSD at 1.00192My total position is now: 2,600,000 . How can i calculate what average price for this position. what formula can i use?Thanks Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants www.mql5.com Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants - Documentation on MQL5 Axioms of trading. Minimum profit must equal trade margin. And if there is a trailing stop, it must be triggered when the floating profit is equal to the margin. Otherwise there is no point. How to code EA to print margin utilized for symbol How to calculate the used margin for a set of buy and sell orders? Andriy Moraru 2011.08.09 12:44 #1 (5 * 1.03756 + 5 * 1.03726 + 10 * 1.03856 + 5 * 1.02362 + 1 * 1.00192) / 26 = ~1.03384The general formula is:(Vol1 * Price1 + Vol2 * Price2 + ... + VolN * PriceN) / Sum(Vol) Johnny 2011.08.09 13:32 #2 Thanks :) New comment
Hi all,
let's say, i made multipe transaction below:
Buy 500,000 AUDUSD at 1.03756
Buy 500,000 AUDUSD at 1.03726
Buy 1,000,000 AUDUSD at 1.03856
Buy 500,000 AUDUSD at 1.02362
Buy 100,000 AUDUSD at 1.00192
My total position is now: 2,600,000 . How can i calculate what average price for this position. what formula can i use?
Thanks