NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 07-17-2012, 08:10 AM   #16
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

You want to use the right tool for the right job. In this case DateTime is the best format for the job. ToTime has limitations that make it not able to use here and is a basic format in general that I suggest you graduate into using DateTime if possible as they have features(Like the one I just showed you) that make it the superior format for Date and Time manipulation.


-Brett
NinjaTrader_Brett is offline  
Reply With Quote
Old 07-17-2012, 08:22 AM   #17
kenb2004
Senior Member
 
Join Date: Jul 2010
Posts: 415
Thanks: 1
Thanked 4 times in 4 posts
Default

No need to use a sledge hammer when a finishing hammer is the proper tool for the job. Graduating to DateTime would be a good thing when necessary, but it seems to me that all you did was make the Year, Month, and Date basically useless in this context, with only the hhmmss remaining. So then why use it in THIS application. NinjaTrader has obviouly designed Drawing Object syntax to be flexible for different programming needs. The DateTime "one size fits all" approach seems to be at odds with NinjaTrader's own flexibility standard.

Thanks again for all your input
Last edited by kenb2004; 07-17-2012 at 08:24 AM.
kenb2004 is offline  
Reply With Quote
Old 07-17-2012, 08:23 AM   #18
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

No problem.
NinjaTrader_Brett is offline  
Reply With Quote
Old 07-17-2012, 03:25 PM   #19
koganam
Senior Member
 
Join Date: Feb 2008
Location: Durham, North Carolina, USA
Posts: 3,218
Thanks: 24
Thanked 1,231 times in 1,002 posts
Send a message via Skype™ to koganam
Default

Quote:
Originally Posted by kenb2004 View Post
No need to use a sledge hammer when a finishing hammer is the proper tool for the job. Graduating to DateTime would be a good thing when necessary, but it seems to me that all you did was make the Year, Month, and Date basically useless in this context, with only the hhmmss remaining. So then why use it in THIS application. NinjaTrader has obviouly designed Drawing Object syntax to be flexible for different programming needs. The DateTime "one size fits all" approach seems to be at odds with NinjaTrader's own flexibility standard.

Thanks again for all your input
Actually for what you want to do, you are going to have to access the DataTime() structure at some point as it is the only way you are going to get the value to differentiate different days: ToTime() is limited to returning an int, derived from the time component only.

The point is then moot. If you are going to have to use the more powerful construct anyway, then just use it for everything in this particular instance.
koganam is online now  
Reply With Quote
Old 07-17-2012, 04:22 PM   #20
kenb2004
Senior Member
 
Join Date: Jul 2010
Posts: 415
Thanks: 1
Thanked 4 times in 4 posts
Default

koganam

As always thanks for your expertise.
kenb2004 is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfering data from Multicharts data format to Ninja Trader data format alex_inditraders General Programming 7 03-01-2012 03:20 AM
Problems with ticks happening at session EndTime gomifromparis Version 7 Beta General Questions & Bug Reports 12 11-16-2010 10:03 AM
BeginTime EndTime timezone ? gomifromparis Version 7 Beta General Questions & Bug Reports 21 02-12-2010 09:11 AM
Converting eSignal OnDemand output file format to NT historical data input format AnotherTrader Connecting 0 09-15-2009 07:21 AM
Time Format grd974 General Programming 6 08-13-2007 06:45 AM


All times are GMT -6. The time now is 09:20 AM.