reporting exchange time - NinjaTrader Programming | futures io social day trading
futures io futures trading


reporting exchange time
Updated: Views / Replies:1,503 / 8
Created: by LostTrader Attachments:2

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
 

reporting exchange time

  #1 (permalink)
Elite Member
Tucson, AZ
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: Mirus/Zen-Fire
Favorite Futures: CL, TF
 
LostTrader's Avatar
 
Posts: 74 since Sep 2009
Thanks: 21 given, 62 received

reporting exchange time

Since in NT, I cannot get my X axis to reflect exchange time, I wrote a silly little indicator to display exchange time. It is obnoxiously inconsistent. Does any one here know why?

Attached Thumbnails
reporting exchange time-nt-time.png  
Attached Files
Register to download File Type: zip ExchangeTime.zip (1.8 KB, 17 views)
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,597 received
Forum Reputation: Legendary



LostTrader View Post
Since in NT, I cannot get my X axis to reflect exchange time, I wrote a silly little indicator to display exchange time. It is obnoxiously inconsistent. Does any one here know why?

I do not know, but it is possible that the 2 charts use different session templates, and that one of the session templates was EST and the other one Central Time.

Another potential explanation is that you used Time[0]. This will convert the last bar time to current time, but not display the time as per now. If you want to know the time right now, you would need to use DateTime.Now instead of Time[0], eventually improve this to allow for display of time under replay conditions.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #4 (permalink)
Elite Member
Tucson, AZ
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: Mirus/Zen-Fire
Favorite Futures: CL, TF
 
LostTrader's Avatar
 
Posts: 74 since Sep 2009
Thanks: 21 given, 62 received


Fat Tails View Post
I do not know, but it is possible that the 2 charts use different session templates, and that one of the session templates was EST and the other one Central Time.

Another potential explanation is that you used Time[0]. This will convert the last bar time to current time, but not display the time as per now. If you want to know the time right now, you would need to use DateTime.Now instead of Time[0], eventually improve this to allow for display of time under replay conditions.

Bingo! I had one template that had inadvertently saved the wrong session for CL (CME US Index Futures ETH) which is apparently Central. I believe CL to be eastern exchange timezone. Thanks! It helps to know where to look.

I do use Time[0]. In general the current bar tick time seems appropriate.
Wouldn't DateTime.Now always give the here and now rather than a time related to the chart time?

Reply With Quote
 
  #5 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,597 received
Forum Reputation: Legendary


LostTrader View Post
I do use Time[0]. In general the current bar tick time seems appropriate.
Wouldn't DateTime.Now always give the here and now rather than a time related to the chart time?

Correct, if you use Time[0], that could be either be the last bar currently displayed on your chart, or when scrolling back horizontally the last hidden bar on the right edge of your chart series.

If you really want that the time relates to the last bar shown on your chart (even when scrolling back) you would need to override the Plot() method or access ChartControl directly from within OnBarUpdate().

Reply With Quote
 
  #6 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,214 received

You also need to create a Timer() if you want it to update each second, otherwise it may not update for several seconds if there is a pause in incoming ticks if you have it in onbarupdate with cobc=false.

There is an example of this in one of the built-in NT indicators if I remember right, the one that measures the countdown timer/minutes remaining for a minute chart, whatever its called.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following user says Thank You to Big Mike for this post:
 
  #7 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,597 received
Forum Reputation: Legendary


Big Mike View Post
You also need to create a Timer() if you want it to update each second, otherwise it may not update for several seconds if there is a pause in incoming ticks if you have it in onbarupdate with cobc=false.

There is an example of this in one of the built-in NT indicators if I remember right, the one that measures the countdown timer/minutes remaining for a minute chart, whatever its called.

Mike

That really depends on what one is trying to achieve. The code example uses the Time[0], which is the time of the last bar of the bar series.

For this logic the timer would not be needed, as

-> for minute built bars it will display the projected time of completion of the bar
-> for bars built from ticks it will show the time of the last tick

For both cases the timer is not required. Inconvenient of this logic is that the time displayed is not necessarily the time of the last bar displayed on the chart, which is not CurrentBar, but LastBarIndexPainted and can only be accessed through ChartControl.

The Timer() would only be needed, if DateTime.Now is used, which will increase irrespectively whether a new incoming tick triggers OnBarUpdate() or not.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #8 (permalink)
Elite Member
Tucson, AZ
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: Mirus/Zen-Fire
Favorite Futures: CL, TF
 
LostTrader's Avatar
 
Posts: 74 since Sep 2009
Thanks: 21 given, 62 received


Fat Tails View Post
Inconvenient of this logic is that the time displayed is not necessarily the time of the last bar displayed on the chart, which is not CurrentBar, but LastBarIndexPainted and can only be accessed through ChartControl.

I did not know there was such a thing as "LastBarIndexPainted" ! It is not in the NT help guide.
Useful to know. Thanks, Fat Tails!

Reply With Quote
 
  #9 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,597 received
Forum Reputation: Legendary


LostTrader View Post
I did not know there was such a thing as "LastBarIndexPainted" ! It is not in the NT help guide.
Useful to know. Thanks, Fat Tails!

You can find out by copying code from other indicators. Step by step you will understand what it means. That is the only way to go. I am a code-copy-master, as it is the fastest way to achieve the goal.

Reply With Quote

Reply



futures io > > > > > reporting exchange time

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Local vs Exchange time Mondrakete TradeStation 2 May 8th, 2011 06:40 PM
Trade Activity Tax Reporting TonyB Traders Hideout 4 March 24th, 2011 01:00 PM
Ninja platform correct reporting? Ilovetotrade NinjaTrader 9 February 19th, 2011 10:40 AM
How to calculate Exchange Opening Time? baruchs NinjaTrader Programming 13 January 12th, 2011 07:08 AM
CME enhanced the reporting of trades Silvester17 Traders Hideout 9 October 12th, 2009 01:47 PM


All times are GMT -4. The time now is 10:39 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-10 in 0.12 seconds with 20 queries on phoenix via your IP 54.221.73.186