Storing dynamic data points in forward testing?

 

Just wanting to throw a question out there!

To make my question simple to understand, lets assume the following on H1:

  • For every up bar, on average, the next bar is a down bar.
  • For every down bar, on average, the next bar is an up bar. 
Now, lets further assume that the averages are more in your favour when the following variables are included:

  • For every up bar that moves 20% in size to the previous bar, the next bar will have better odds that it will be a down bar
  • For every down bar that moves 20% in size to the previous bar, the next bar will have better odds that it will be an up bar
I am wanting this to be dynamically stored within my EA. What I mean by this is, every single bar that meets this simple criteria, I am wanting to store these averages (e.g. average win rate % under the 20% rule above) moving forward in a live environment. It means that my EA becomes dynamic and changes with what the H1 bars are actually saying inline with my theory.

 In a nut-shell, what function within MQL4 is the best to use when recording such information and further more, being able to actively use it within code?

 

Hope that makes sense?

 

D

 
Anyone have any thoughts on this :)?
 
Actually, just calculate and use Global Variables. Many have similar questions and mostly people are getting annoyed to answer it.