number of ticks in a bar/ms timestamp ? - NinjaTrader Programming | futures io social day trading
futures io futures trading


number of ticks in a bar/ms timestamp ?
Updated: Views / Replies:5,055 / 15
Created: by sam028 Attachments:1

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
 1  
 
Thread Tools Search this Thread
 

number of ticks in a bar/ms timestamp ?

  #1 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,572 given, 3,982 received

number of ticks in a bar/ms timestamp ?

Two different questions...

1/ I'm looking for an indicator which will able to show how many ticks we had in a min/vol/range bar.
I think I can write it, but if it's already done somewhere, I'll take it .

2/ I'm trying to store, with ZenFire datafeed and NT, tick data with a milli-second timestamp. AFAIK, I can write an indicator which is writing a line after each tick, but the timestamp will be the computer time, not the transaction time right ?
I think the best way to do this is do directly use ZF API, but I'll be happy if someone can confirm this.


Thx.

Reply With Quote
 
  #2 (permalink)
Elite Member
Arcata, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: index futures, oil
 
Saroj's Avatar
 
Posts: 482 since Jun 2009
Thanks: 223 given, 389 received


sam028 View Post
Two different questions...

1/ I'm looking for an indicator which will able to show how many ticks we had in a min/vol/range bar.
I think I can write it, but if it's already done somewhere, I'll take it .

2/ I'm trying to store, with ZenFire datafeed and NT, tick data with a milli-second timestamp. AFAIK, I can write an indicator which is writing a line after each tick, but the timestamp will be the computer time, not the transaction time right ?
I think the best way to do this is do directly use ZF API, but I'll be happy if someone can confirm this.


Thx.

sam, I'm just starting to explore time in NS/C# so may be totally off topic here... but I changed my computer time ... both the hour and minute... I'm displaying Time[0] in an output window and it is continuing to show a bar time that is consistent with the chart (which is different from my current computer time)... I notice that it disconnects and reconnects to zenfire after I change the time which I suspect is a sync up situation... as far as milli seconds... no idea... it only displays seconds in the output window. I did notice that NT Josh says Time[0] returns the DateTime timestamp of the bar, let alone a "tick".

Are you trying to replicate the market replay data? or is that compressed in some way? Have you tried to determine its data structure?

Reply With Quote
 
  #3 (permalink)
Market Wizard
New Orleans, La (Mardi Gras City)
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Ninjatrader / Optimus Futures / AmpFutures
Favorite Futures: ES / 6E / 6B / CL
 
DavidHP's Avatar
 
Posts: 1,002 since Aug 2009
Thanks: 802 given, 1,367 received


According to gomifromparis on the NT board
"NT has 1 second granularity in timestamps."

NinjaTrader Support Forum - View Single Post - Delta Buy/Sell Volume

I've not personally verified this but this guy produces some pretty good indicators and seems to know a lot about NT.

Hope this helps.

Reply With Quote
The following user says Thank You to DavidHP for this post:
 
  #4 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,572 given, 3,982 received


DavidHP View Post
According to gomifromparis on the NT board
"NT has 1 second granularity in timestamps."

NinjaTrader Support Forum - View Single Post - Delta Buy/Sell Volume

I've not personally verified this but this guy produces some pretty good indicators and seems to know a lot about NT.

Hope this helps.

Right, I've read this before, Ninja is 1sec min granularity. The solution may be to use the ZenFire API, but I didn't already played with it, that was I'm looking for.
Another way, I'm testing it now, is getting the current time, with ms precision, after each tick, but it's not really what the best way to do it.
I'm trying to play with the duration between two ticks, to see if this information can be useful or not.

Reply With Quote
 
  #5 (permalink)
Elite Member
Arcata, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: index futures, oil
 
Saroj's Avatar
 
Posts: 482 since Jun 2009
Thanks: 223 given, 389 received

sam, you've probably found this already, but I just came across it... p487 of NinjaTraderVersion6HelpGuide.pdf on C3 Method (Functions) Reference

Attached Thumbnails
number of ticks in a bar/ms timestamp ?-system-datetime-reference.png  
Reply With Quote
The following 2 users say Thank You to Saroj for this post:
 
  #6 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,572 given, 3,982 received


Saroj View Post
sam, you've probably found this already, but I just came across it... p487 of NinjaTraderVersion6HelpGuide.pdf on C3 Method (Functions) Reference

Thx, I didn't see this, but I'm using something similar:
 
Code
                            
protected override void OnBarUpdate() {
string myTime DateTime.Now.ToString("HH:mm:ss:ffff");
... 
Like I wrote it before, this is not the best solution, I'll like to have what the datafeed provider really sent to Ninja (the tape with ms timestamp), but it's enough for a first approach. And it's interesting to see how many ticks/second can be managed by NT (my first tests show that 30 ticks/seconds is fine).

Reply With Quote
 
  #7 (permalink)
Just starting out...
Chicago
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: ZenFire
Favorite Futures: TF
 
Posts: 2 since Jul 2009
Thanks: 2 given, 0 received

i have been able to measure time between ticks down to the ms using stopwatch in C#.

has anyone been able to get actual timestamps through the zen fire API?

Reply With Quote
 
  #8 (permalink)
Elite Member
SE-Asia
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Amp
Favorite Futures: ES
 
Posts: 141 since Jun 2009
Thanks: 57 given, 114 received


sam028 View Post
Thx, I didn't see this, but I'm using something similar:
 
Code
                            
protected override void OnBarUpdate() {

string myTime DateTime.Now.ToString("HH:mm:ss:ffff");
... 
Like I wrote it before, this is not the best solution, I'll like to have what the datafeed provider really sent to Ninja (the tape with ms timestamp), but it's enough for a first approach. And it's interesting to see how many ticks/second can be managed by NT (my first tests show that 30 ticks/seconds is fine).

Did you try DateTime.Now.Ticks

Reply With Quote
The following user says Thank You to Prtester for this post:
 
  #9 (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,220 received


jcash View Post
i have been able to measure time between ticks down to the ms using stopwatch in C#.

has anyone been able to get actual timestamps through the zen fire API?

Use OnMarketData and then use e.Time for the data feed timestamp.

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
 
  #10 (permalink)
Just starting out...
Chicago
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: ZenFire
Favorite Futures: TF
 
Posts: 2 since Jul 2009
Thanks: 2 given, 0 received


e.Time.ToString("HH:mm:ss:ffff") in OnMarketData is giving me NT's rounded timestamp:

Last Price: 641.3 Last Time: 12:56:04:0000

Reply With Quote

Reply



futures io > > > > > number of ticks in a bar/ms timestamp ?

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
Book Discussion: Reading Price Charts Bar by Bar by Al Brooks cunparis Traders Hideout 530 October 19th, 2016 08:45 PM
highest bar close occuring within the last X number of bars . . . . jmejedi NinjaTrader Programming 37 October 6th, 2014 01:52 AM
500 ms delay. How to create one arjfca MultiCharts 1 July 6th, 2011 09:47 AM
Sierra Chart and DTN IQfeed bug (Invalid DTN Level 2 timestamp) Big Mike Sierra Chart 19 February 1st, 2011 03:00 PM
How do I access the bar number under the cursor? koganam NinjaTrader Programming 3 September 6th, 2010 10:25 AM


All times are GMT -4. The time now is 05:53 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-12 in 0.14 seconds with 20 queries on phoenix via your IP 54.167.44.32