Re: computing moving average

Home 21090308 Forums Re: computing moving average


Some of the code are compiled and encrypted so that you cannot see. This is normal.

If you need to keep track of a “running” minimum, e.g.., 50-day minimum, you can create a new class/data structure to do it.
You create a class called “RunningMinimum”. Each time it updates, you discard the oldest data, and insert the newest data, in, e.g., [tt:3d0gbam0]ArrayList[/tt:3d0gbam0]. Then you compute the minimum for only the data in the list/buffer/storage.

Afterward, you will use this new data structure/class in your signal class.

The key is: for each concept you have, e.g., running minimum, signal, strategy, create a separate and independent class for it. You don’t build the whole thing in one file.