Creating a Time Zone drop down property - NinjaTrader | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader

Creating a Time Zone drop down property
Started:October 11th, 2013 (05:57 AM) by gomi Views / Replies:420 / 0
Last Reply:October 11th, 2013 (05:57 AM) Attachments:1

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Creating a Time Zone drop down property

Old October 11th, 2013, 05:57 AM   #1 (permalink)
Elite Member
Futures Experience: None
Platform: NinjaTrader
Posts: 1,137 since Oct 2009
Thanks: 195 given, 3,886 received

Creating a Time Zone drop down property

Dunno if it's already been posted, but anyways here's what you can do to add a Time Zone property on your indy, using Linq and TypeConverters

1. Add System.Linq namespace
using System.Linq;

2. Add TypeConverter class

public class TZListConverter : TypeConverter
	public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
		return true;
	public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
		return new StandardValuesCollection((TimeZoneInfo.GetSystemTimeZones()).Select(x=>x.DisplayName).ToList());

3. Add a TimeZoneInfo element that will hold your selected Time Zone
TimeZoneInfo tzi=TimeZoneInfo.Local;

4. Add your property
[Description("Time Zone")]
[Category("User defined values")]
[Gui.Design.DisplayNameAttribute("Time Zone")]
public string TZI
		return tzi.StandardName;
		tzi = TimeZoneInfo.GetSystemTimeZones().FirstOrDefault<TimeZoneInfo>(x=>((x.DisplayName==value)||(x.StandardName==value)));

5. Done
Please register on to view futures trading content such as post attachment(s), image(s), and screenshot(s).

6. And it serializes correctly !

Reply With Quote
The following 8 users say Thank You to gomi for this post:

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > Creating a Time Zone drop down property

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

Corey Rosenbloom: Tips, Tactics, and Real Trades: Trading Intraday Trend Reversals

Elite only

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
What time zone do you trade? h4cked Traders Hideout 5 April 30th, 2014 11:01 AM
Time zone / market zone indicator for forex trading Angelo1 NinjaTrader 3 March 1st, 2013 02:34 PM
Euro zone may drop private sector from ESM bailout kbit News and Current Events 0 November 25th, 2011 11:03 AM
Is there a way to adjust time zone ? GridKing Tech Support 2 July 4th, 2011 05:16 PM
Creating a 12 minutes time scale arjfca EasyLanguage Programming 4 September 19th, 2010 01:14 AM

All times are GMT -4. The time now is 07:34 AM.

Copyright © 2016 by All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts

Page generated 2016-10-21 in 0.07 seconds with 20 queries on phoenix via your IP