Here is my PRT code for those would be interested in. It returns the number of ticks per second in any UT “ticks”.
Feel free to add moving average… and comments.
BR,
Thomas
//Variable : //Variable : ticks quantity of the current timeframe (21 ticks by default)
Variable=21
Hr=Round(OpenTime/10000)
if Hr*10000>OpenTime then
Hr=Hr-1
endif
M=Round((OpenTime-Hr*10000)/100)
if M*100>OpenTime-Hr*10000 then
M=M-1
endif
S=OpenTime-(Hr*10000+M*100)
Taillme=3600*Hr+60*M+S
Ticksme=Variable/(Taillme-Taillme[1])
Return Ticksme