Guys, sorry about the delay. Here is the source code. Please note that it will only work in 5-min chart.
-------
I havent looked at daytradetowin website for a long time, so i am not sure if its still the same. but if he hadnt changed the logic, it should be exactly the same.
Almost a year ago, I wasted two days of my life in figuring out the logic. Never traded it with real $.
make sure you adjust the "start_hour" and "start_min" parameters to fit your time zone. the default values are for gmt +8 timezone.