Average price between 5 or more lines ?
-
Hello, I already know how to find an average price between open orders.
Is there any way to find an average price between 5 or more lines on the chart and with each new line generated the price is updated?
Can anyone give an example? -
Technically it is possible, but what do you exactly mean by 'average'? A median average or a ponderate average?
-
@l-andorrà I don't exactly know the difference between the two.
But would you be able to give an example in a project for me? -
The median is the sum of all values and the divided by the number of units used, whereas the second is the multiplication of all value and then divided by the number of units. You can use standard formula blocks in both cases. You can do it via 'for each trade' blocks.
-
The problem is exactly there as I mentioned above.
I already know how to do it with entry prices, because I can make a loop looking for these entry prices with the blocks (pink).
What I'm not understanding is how to make a loop to look for all the prices of the lines plotted on the chart and thus find an average price for them.