![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Nov 2010
Posts: 59
Thanks: 1
Thanked 4 times in 2 posts
|
I am not a programmer, can some one help me with a script to convert the integar time format HHMMSS generated from ToTime() into seconds,
for example, integar time 113015 to seconds: 11x60x60 + 30x60 + 15 = 41415 seconds
Last edited by solvmatic; 11-29-2010 at 10:44 PM.
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
|
I think this is would be what you're after -
Print(TimeSpan.Parse(ToTime(Time[0]).ToString()).TotalSeconds);
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Nov 2010
Posts: 59
Thanks: 1
Thanked 4 times in 2 posts
|
Bertrand, thanks for your reply, it works!!
hopefully i can use it to come out a indicator to show the speed of tape and order size. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DayOfWeek or ToTime or Time? | GreenTrade | Strategy Development | 10 | 06-11-2012 06:30 PM |
| e.Time vs ToTime | mgin98 | General Programming | 4 | 09-28-2010 03:00 PM |
| ToTime (Time [0]) | hegh2000 | Version 7 Beta General Questions & Bug Reports | 4 | 02-03-2010 11:03 AM |
| convert limit order to market after N seconds | dha3936420 | Strategy Development | 1 | 08-12-2008 08:38 AM |
| Question about ToTime(Time[0]) | mazachan | General Programming | 1 | 07-09-2007 09:08 AM |