Getting Time[0] in session template timezone with a supereasy method...? - NinjaTrader | futures io social day trading
futures io futures trading


Getting Time[0] in session template timezone with a supereasy method...?
Updated: Views / Replies:501 / 3
Created: by matevisky Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Getting Time[0] in session template timezone with a supereasy method...?

  #1 (permalink)
Mate
Budapest, Hungary
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: TopstepTrader
Favorite Futures: NQ, TF, YM
 
matevisky's Avatar
 
Posts: 469 since May 2013
Thanks: 632 given, 1,544 received

Getting Time[0] in session template timezone with a supereasy method...?

I am trying to cleanup my code, and make it work in everytimezone. I've checked many forum, about to how to make it simple, but as I see it is not simple, but maybe.
So here is the deal:
I am using 24/7 template to show my tick chart. My indicator only useable on this template anyway, so not a big deal.
I can spot, when the new session is starting that is cool ( Bars.FirstBarOfSession )

But here is the problem. Is there any supereasy way to get SessionTime in the Session Timezone instead of getting Time, on the current timezone? Really It would be superhelpfull to get all the time in the given sessiontemplate session timezone? Checking the time of day, checking is that a weekend or not, checking is that a holiday date or not would be much more easier....

If not, than I guess I have to use @Fat Tail conversition logic, to get the right time...

Thx in advnace

Mate

Reply With Quote
 
  #2 (permalink)
Mate
Budapest, Hungary
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: TopstepTrader
Favorite Futures: NQ, TF, YM
 
matevisky's Avatar
 
Posts: 469 since May 2013
Thanks: 632 given, 1,544 received

Dig deeper

Oke sorry. After some more deeper investigation: here is the answer

 
Code
				
Print(Bars.GetSessionDateFromLocal(Bars.Session, Time[0]));

Máté
Full time traderLive journal here
Reply With Quote
The following user says Thank You to matevisky for this post:
 
  #3 (permalink)
Mate
Budapest, Hungary
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: TopstepTrader
Favorite Futures: NQ, TF, YM
 
matevisky's Avatar
 
Posts: 469 since May 2013
Thanks: 632 given, 1,544 received



matevisky View Post
Oke sorry. After some more deeper investigation: here is the answer

 
Code
				
Print(Bars.GetSessionDateFromLocal(Bars.Session, Time[0]));

Hm, this is stupid, but this function only give back the date, but not the time... I thought it is converting the Time[0] to session time, but not... make no sense. I will use @Fat Tail approach, as I see there is no easy way to do this, only the hard one. Converting the timezone into the session timezone

Máté
Full time traderLive journal here
Reply With Quote
 
  #4 (permalink)
Mate
Budapest, Hungary
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: TopstepTrader
Favorite Futures: NQ, TF, YM
 
matevisky's Avatar
 
Posts: 469 since May 2013
Thanks: 632 given, 1,544 received

Final solution

Oke, here is the solution. It is looks good:

 
Code
DateTime instrumentSessionDate = TimeZoneInfo.ConvertTime(Time[0], TimeZoneInfo.Local, Bars.Session.TimeZoneInfo);

Máté
Full time traderLive journal here
Reply With Quote
The following 2 users say Thank You to matevisky for this post:

Reply



futures io > > > > Getting Time[0] in session template timezone with a supereasy method...?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Session Template with NinjaScript Ash669 NinjaTrader Programming 4 May 11th, 2013 03:36 AM
SESSION TEMPLATE gparkis NinjaTrader 6 November 10th, 2012 08:50 AM
YM Session Template tderrick Emini Index Futures Trading 2 February 16th, 2012 07:54 AM
Session template for the TF? Upupandaway NinjaTrader 5 December 14th, 2011 03:13 PM
How to reference Session template Price/Time? forrestang NinjaTrader Programming 8 November 24th, 2011 01:05 PM


All times are GMT -4. The time now is 10:36 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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 2017-12-16 in 0.09 seconds with 27 queries on phoenix via your IP 54.227.51.103