Hello everyone, I'm a day trader and would like to make a formula that adjusts a moving average with just one input change. I'm trying to get the average of the last X amount of days and change this based on the input of Days in test. I also want it to test only the number of days in test all the way down. Formula I have now only updates the currently selected number of days and 1 prior. Not sure what I've done wrong or how to fix it. I've been struggling with this for a few days now and would really appreciate some help. Thanks in advance.
=IF($I$2=G2;AVERAGE($E$2:E2);IF($I$2=G2-1;AVERAGE($E$2:E2);""))
<tbody>
</tbody>
=IF($I$2=G2;AVERAGE($E$2:E2);IF($I$2=G2-1;AVERAGE($E$2:E2);""))
<colgroup><col width="86"><col width="109"><col width="104"><col width="102"><col width="110"><col width="120"><col width="86"><col width="86"><col width="86"></colgroup> <tbody> </tbody> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<tbody>
</tbody>