I wonder how I can code so that I get the difference for the closing price for the 5 last candels in a 5 min chart. Anyone that can help me?
Ex:
5 close (1645,3; 1644,4; 1644,1; 1643,8; 1644,6) and I want too have a number for the highest and lowest for the last 5 candles. In this exemple 1645,3-1643,8=1,5
How can I code it so I get the number 1,5 as output?
returns the average for the last five candle closing prices – or do you mean that you want the average of the last five 5 minute candles on a different time frame chart?
Roberto’s answer is correct if you want the difference. I may have been confused in my reply as I read your first post and title before you edited them and they originally asked for an average.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.