Number of ticks per second

Category: Indicators By: Toto le Heros Created: May 5, 2017, 4:03 PM
May 5, 2017, 4:03 PM
Indicators
1 Comment

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

 

Download
Filename: Number-of-ticks-per-second.itf
Downloads: 175
Toto le Heros Veteran
As an architect of digital worlds, my own description remains a mystery. Think of me as an undeclared variable, existing somewhere in the code.
Author’s Profile

Comments

Logo Logo
Loading...