Win Ratio for HighLow option;)

 
Hello! I’m a new of here:) 
I would love you to teach me how to program Win Ratio of HIGH/LOW options. 

I have some signal indicators which shows arrow for High or Low as MQL4 file. 
And I’d love to add Win Ratio in this indicator. Plese teach me the way to write Won Ratio Program;)

 My need is that Calculating Win ratio of the arrow signal in 500 bars!! 

Many thanks in advance;)
Reason: