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 > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 01-19-2011, 08:50 AM   #1
occam
Member
 
Join Date: Aug 2010
Posts: 89
Thanks: 0
Thanked 0 times in 0 posts
Send a message via Skype™ to occam
Default Time Zone

I have developed a strategy that references specific time of day. If I am not in the EST zone how do I enforce EST times?
occam is offline  
Reply With Quote
Old 01-19-2011, 09:00 AM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hi Occam,

There is a C# method you can use for this. It will convert any time object ToUniversalTime().

You can add or subtract from this to get to Eastern time.

int easternTime = ToTime(Time[0].ToUniversalTime().AddHours(-4));
NinjaTrader_RyanM 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
time zone? stalt Miscellaneous Support 6 10-31-2012 11:57 AM
time zone tonynt Miscellaneous Support 8 11-24-2010 12:19 AM
time zone colour reggiedonald Charting 1 02-16-2010 09:42 AM
Time Zone / globalization blarouche Version 7 Beta General Questions & Bug Reports 2 11-11-2009 05:42 PM
time zone setting/time displayed on charts always4nu Charting 2 09-29-2009 09:10 AM


All times are GMT -6. The time now is 05:48 AM.