So this function will track a simple moving average. For example, if this moving average has been heading
higher, but then the current value of it is < than the previous bar, we will start a count from that
I want the function to track the difference between the value of a simple moving average on the
current bar compared to the previous bar, and find the average value from when it changed
So lets say we are tracking the 5 bar moving average. And it was going up, but now it starts to
move down. Let's say it has moved down for the last three bars. The first bar it moved down
15 pips, the second 14, and the third 12.
I want to add all those together and /3, and write the average of these three bars into the log file.
I want to be able to do this for as many moving averages as I want, to be able to see what is the
current average of each, so that I can compare the different averages together.
Check out my ea example. It does a good job of this, except it just shows the difference of the
current value compared to the previous bar. This is interesting, but I don't think it gives enough
information for me.
But I want to be able to have it look pretty much the same in the log file, except I want to also
see the average value as well.
Later, after some study, I plan to utilize this in an ea.