i would like to run a script that will tell me how many times X happens over X periods. EXAMPLE- i would like to know how many times does the second 5 minute candle @london (opening) close higher than the first 5 min candle? so first 2 candles that have higher highs and higher lows over the past 30 days. this example is non-indicator based but simply a question that i need put into a %. the second part is indicator based. EXAMPLE - how many times does price rebound X amount of points when it first touches the R1 or S1 of my Pivot indicator over the past 90 days? can anyone help write something that will compile data like this so i can derive %? i am also open to the idea of being trained/mentored on how to write things of this nature.