I was messing around with a project and thought I would share. I welcome any input so feel free to make suggestions, or your welcome to just make fun of it.
This indicator is a Walk Forward Optimizer for a pair of moving averages. The moving averages in this case is the Ahrens Moving Averages that I have previously posted in the elite section. Pay attention to the output window as I print the results of the optimization there.
HOW IT WORKS
At the beginning of each session it will optimize the two variables (Moving Average Periods) for the last three sessions and draw the optimized moving averages for the current session. So the optimized variables are never tested on the current session that it is being drawn. Optimized prices takes place after the moving average cross on the open of the next bar.
I used the walk forward method to avoid CPU lag and massive curve fitting.
It works only on minute charts at the moment, but i am exploring solutions for other chart types.
I can't take full credit for this idea and code as I am building it off of a post found here on nexusfi.com (formerly BMT) @ The code in this link was good but the logic did not make perfect sense to me so I changed it up a bit. The original Author left out a lot to make it work and I believe he was using it every bar , which I feel is too optimized, so i switched it to a walk forward method.