How to write statistics for TOS?



New member
I want to compare stats on gap up days of tickers. Specifically with its relation with SSR and Fibo ret. I know some #c programming but not how TOS works.

I want the program to go over the past year and check the days that gapped up more than X%, and than see its reactions in 5min candles to Fib ret. any starting point on that? wouldn't mind hiring someone too. Im tracking all this data in spreadsheet but hell, automation will be so much easier!
any help is welcome