historical data programming question - NinjaTrader Programming | futures io social day trading
futures io futures trading


historical data programming question
Updated: Views / Replies:343 / 9
Created: by nicanorbabula 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
 

historical data programming question

  #1 (permalink)
Elite Member
Torino Italy
 
Futures Experience: Beginner
Platform: NinjaTrader, MultiCharts
Broker/Data: AMP/CQG + OEC/OEC
Favorite Futures: CL
 
Posts: 14 since Oct 2014
Thanks: 5 given, 4 received

historical data programming question

Hello everybody,

This is my first question in here, so please excuse any eventual mistakes (wrong forum, etc)...

A)
Anybody has or know where to find reliable piece of code that would:
1) construct good time-based bars from ticks?
2) construct bigger timeframe bars from 1 second bars?
I already have a piece of code that does that, but I would really love to find something more "official", or already tested...

B)
What would be the reliability of such a conversion?
Would it be better to save the already formed bars provided from the datafeed (although not very practical because there is virtually an infinite number of bars (ranges, time-based, ...)


Thank you very much!

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
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,463 since Sep 2013
Thanks: 1,691 given, 3,656 received
Forum Reputation: Legendary


Reponding to your B) question :

It all depends what you are trying to do...

If you have tick data and store the tick data (provided you have the space) then you can create any kind of
time based bars (and all other synthetic and derived bars). Storing tick data gives you the broadest option.

1. Is your data good tick data ? Do you need maximum flexibility ?

2. Alternatively you can decide to aggregate tick data into an acceptable time frame bar, the fundamental
difference between tick and time based, is that you will have to let go some other information, which you
might have or not...

On a tick level, you might have bid and ask price and you might have the volume at the bid and ask, if
applicable.. That information is useful in some cases, to create certain extra insight...

Reply With Quote
 
  #4 (permalink)
Elite Member
Torino Italy
 
Futures Experience: Beginner
Platform: NinjaTrader, MultiCharts
Broker/Data: AMP/CQG + OEC/OEC
Favorite Futures: CL
 
Posts: 14 since Oct 2014
Thanks: 5 given, 4 received


rleplae View Post
Reponding to your B) question :

It all depends what you are trying to do...

If you have tick data and store the tick data (provided you have the space) then you can create any kind of
time based bars (and all other synthetic and derived bars). Storing tick data gives you the broadest option.

1. Is your data good tick data ? Do you need maximum flexibility ?

2. Alternatively you can decide to aggregate tick data into an acceptable time frame bar, the fundamental
difference between tick and time based, is that you will have to let go some other information, which you
might have or not...

On a tick level, you might have bid and ask price and you might have the volume at the bid and ask, if
applicable.. That information is useful in some cases, to create certain extra insight...

Thanks for the answer

1. How can I check if I have good tick data? I am starting from AMP's 5-year history offered along with Multicharts special edition. Is there any better affordable solution? I only need 2 years of tick history.

2. Pre-agregating it in bars doesn't feel right...

Reply With Quote
 
  #5 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,463 since Sep 2013
Thanks: 1,691 given, 3,656 received
Forum Reputation: Legendary


nicanorbabula View Post
Thanks for the answer

1. How can I check if I have good tick data? I am starting from AMP's 5-year history offered along with Multicharts special edition. Is there any better affordable solution? I only need 2 years of tick history.

2. Pre-aggregating it in bars doesn't feel right...

Depends what you want to do ?

Give me an example of a trade setting or how you trade ?
You want to test your method / system ?

Reply With Quote
 
  #6 (permalink)
Elite Member
Torino Italy
 
Futures Experience: Beginner
Platform: NinjaTrader, MultiCharts
Broker/Data: AMP/CQG + OEC/OEC
Favorite Futures: CL
 
Posts: 14 since Oct 2014
Thanks: 5 given, 4 received


rleplae View Post
Depends what you want to do ?

Give me an example of a trade setting or how you trade ?
You want to test your method / system ?

I am building a new platform and I need at this point to build a historical data too, otherwise it would be very counter-producting to write for MC or NT and backtest there and *then* migrate code to my platform. The backtester (trades engine) is already written, auto-trading part too. All I need is historical data.

My idea is to put all the ticks (also the best ones ) in Google BigQuery or the Google Datastore and then requesting them when backtesting. Everything would run from Amazon instances so internet speed would never be an issue.

My strategies trade futures intraday and work with 2 timeseries of the same future working all like this:
Let's imagine it goes long on green inside-bars and short on red inside-bars. It would wait for a 15 mins inside bar to close then send stop-limit order with the next tick (or the close of the first 1 sec bar after the close of the 15 min inside bar).
So:
Every strategy needs a big timeframe (like 15m, 5m, 60m for geometrical recognition purposes) and a "clock" one (tick, 1 second or at worst 5 seconds). I also trade up to 6 different symbols.

You can immagine that given this situation my historical database must provide me any kind of bars for the geometrical dataseries and at worst 5 second bars for the "clock" dataseries.

Word of advice?

Reply With Quote
 
  #7 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,463 since Sep 2013
Thanks: 1,691 given, 3,656 received
Forum Reputation: Legendary


nicanorbabula View Post
I am building a new platform and I need at this point to build a historical data too, otherwise it would be very counter-producting to write for MC or NT and backtest there and *then* migrate code to my platform. The backtester (trades engine) is already written, auto-trading part too. All I need is historical data.

My idea is to put all the ticks (also the best ones ) in Google BigQuery or the Google Datastore and then requesting them when backtesting. Everything would run from Amazon instances so internet speed would never be an issue.

My strategies trade futures intraday and work with 2 timeseries of the same future working all like this:
Let's imagine it goes long on green inside-bars and short on red inside-bars. It would wait for a 15 mins inside bar to close then send stop-limit order with the next tick (or the close of the first 1 sec bar after the close of the 15 min inside bar).
So:
Every strategy needs a big timeframe (like 15m, 5m, 60m for geometrical recognition purposes) and a "clock" one (tick, 1 second or at worst 5 seconds). I also trade up to 6 different symbols.

You can immagine that given this situation my historical database must provide me any kind of bars for the geometrical dataseries and at worst 5 second bars for the "clock" dataseries.

Word of advice?

if the auto-trader is written, use the same data format
what does it use ? how did you test it ?

Reply With Quote
 
  #8 (permalink)
Elite Member
Torino Italy
 
Futures Experience: Beginner
Platform: NinjaTrader, MultiCharts
Broker/Data: AMP/CQG + OEC/OEC
Favorite Futures: CL
 
Posts: 14 since Oct 2014
Thanks: 5 given, 4 received


rleplae View Post
if the auto-trader is written, use the same data format
what does it use ? how did you test it ?

Actually, not the data format is the problem, but whether storing all timeframes possible or only tick data.

Reply With Quote
 
  #9 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,463 since Sep 2013
Thanks: 1,691 given, 3,656 received
Forum Reputation: Legendary


nicanorbabula View Post
Actually, not the data format is the problem, but whether storing all timeframes possible or only tick data.

Storing all possible timeframes does absolutely not make any sense.

If you store minute bars, you can convert that in 2, 3, 5, 10, 15, 30 60 or any time frame bars
So storing multiple timeframe time based bars is overlap

If you store tick based information, you have maximum flexibility and every possible time
frame can be derived from the proper tick based information.

Additional information can be bid and ask and the volume at bid and ask.
Additional information can be Level2 (very voluminous)

If you only use time based bars, then storing the lowest level (provided the others are a
multiple off) is sufficient

Reply With Quote
 
  #10 (permalink)
Elite Member
Torino Italy
 
Futures Experience: Beginner
Platform: NinjaTrader, MultiCharts
Broker/Data: AMP/CQG + OEC/OEC
Favorite Futures: CL
 
Posts: 14 since Oct 2014
Thanks: 5 given, 4 received



rleplae View Post
Storing all possible timeframes does absolutely not make any sense.

If you store minute bars, you can convert that in 2, 3, 5, 10, 15, 30 60 or any time frame bars
So storing multiple timeframe time based bars is overlap

If you store tick based information, you have maximum flexibility and every possible time
frame can be derived from the proper tick based information.

Additional information can be bid and ask and the volume at bid and ask.
Additional information can be Level2 (very voluminous)

If you only use time based bars, then storing the lowest level (provided the others are a
multiple off) is sufficient

This actually makes my day! So simple and I didn't think of it

I'll store Ticks and 1 Second bars and maybe, just maybe 1 min bars and daily bars as provided by the source, so that I will be able to build any type of timeframe without having to actually request an infinite amount of data (it would be a sin to load ticks in order to build 1 year worth of daily bars...)

I will use the ticks to build all kind of bars, but time-based ones.
... the 1 Second bars to build up to 1 minute
... the 1 minute bars to build bars up to 23 hours
... the daily ones up to 1 year (will have only 2 years though haha)


Lastly, anybody knows anything about the quality of historical data provided by AMP with Multicharts Special Edition through CQG? How would you measure it programmatically?

Is IQFeed better (saw it mentioned around here a lot)?

Thanks a lot!

Reply With Quote

Reply



futures io > > > > > historical data programming question

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
ThinkScript (TOS) Programming Question Curbfeeler ThinkOrSwim Programming 10 March 8th, 2016 04:19 PM
SC programming help. Newbie question. gryandc Sierra Chart Programming 5 November 23rd, 2015 05:23 PM
EL question--need help intraday programming jschultzjr EasyLanguage Programming 5 September 26th, 2013 08:28 PM
NT Programming Question - Avoiding Re-entry? Fibbee NinjaTrader 5 January 11th, 2013 04:49 AM
Intrabarpersist and Historical tick data Question marketstudent EasyLanguage Programming 2 August 13th, 2010 03:07 PM


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

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-11 in 0.17 seconds with 19 queries on phoenix via your IP 54.226.132.197