I would like to have an indicator with the following conditions. If the closing price is up one day, it gives the value 1. If it is up two days in a row, it gives the value 2. If it is up three days in a row, it gives the value 3, and so on. If the closing price is the same as the previous day, it counts as an up day if the previous day was an up day. I would like to have an indicator that shows an average for the up days for the last 60 days. For example: If we have one where there is 6 up days in a row,and one where there is 4 up days in a row and two where there is 2 up days in a row. The indicator should show (6+4+2+2)/4 =3.5. I would like a similar one for down days. The result can be shown in a line chart where both the up days and the down days are shown in the same indicator with two different lines. Thankful for help