NexusFi: Find Your Edge


Home Menu

 





Historical futures quote (best bid/ask) data?


Discussion in Brokers

Updated
      Top Posters
    1. looks_one artemiso with 5 posts (2 thanks)
    2. looks_two LukePoga with 5 posts (2 thanks)
    3. looks_3 energetic with 2 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 5,805 views
    2. thumb_up 7 thanks given
    3. group 6 followers
    1. forum 14 posts
    2. attach_file 0 attachments




 
Search this Thread

Historical futures quote (best bid/ask) data?

  #11 (permalink)
 artemiso 
New York, NY
 
Experience: Beginner
Platform: Vanguard 401k
Broker: Yahoo Finance
Trading: Mutual funds
Posts: 1,152 since Jul 2012
Thanks Given: 784
Thanks Received: 2,685


LukePoga View Post
they were my favourite data source too.

PM'ed you.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
32 thanks
Bigger Wins or Fewer Losses?
24 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
  #12 (permalink)
 energetic 
hk
 
Experience: Intermediate
Platform: NinjaTrader
Posts: 55 since Apr 2010
Thanks Given: 23
Thanks Received: 17


artemiso View Post
PM'ed you.

Could you PM me too?

Reply With Quote
  #13 (permalink)
 artemiso 
New York, NY
 
Experience: Beginner
Platform: Vanguard 401k
Broker: Yahoo Finance
Trading: Mutual funds
Posts: 1,152 since Jul 2012
Thanks Given: 784
Thanks Received: 2,685



energetic View Post
Could you PM me too?

OK sure thing.

Reply With Quote
  #14 (permalink)
 energetic 
hk
 
Experience: Intermediate
Platform: NinjaTrader
Posts: 55 since Apr 2010
Thanks Given: 23
Thanks Received: 17

thanks


artemiso View Post
OK sure thing.


Reply With Quote
  #15 (permalink)
 iantg 
charlotte nc
 
Experience: Advanced
Platform: My Own System
Broker: Optimus
Trading: Emini (ES, YM, NQ, ect.)
Posts: 408 since Jan 2015
Thanks Given: 90
Thanks Received: 1,148

I dabble in this space and have built some fairly granular micro structures using NinjaTrader with an extraction program I wrote in C# and some clean up / sequencing scripts in MS SQL. So if you don't mind getting into some basic coding and you don't mind doing the work yourself, you can get the following fairly easily.


Prerequisites are to download Ninjatrader 8 and then download market replay data for whatever instrument / period you want. Then write your code and output it to either the output window or write it to a text file, both are fairly easy.

1. Ninjatrader has a level 1 feed that gives you access to things like: Adds, Cancels (you have to do a little work to distinguish these), and Transactions. The transactions are granular but the basic volume updates come in aggregate, so you have to do a little work to un-bundle these to see the individual order updates, and make sense of everything. It's not as clean as the MBO feed, but it's directionally accurate and can be useful to help you get access to the data in whatever format you want it (By order, by price level, by tick aggregate, etc.). You can work from this event handler to access the level 1 feed: (Major Event Handler below)

protected override void OnMarketData(MarketDataEventArgs marketDataUpdate)
{

}

2. Within the OnMarketData feed you can pull the all the prices and all the level 1 volume updates from the Bid or Ask. These contain not just transactions but adds and cancels as well. So to the OP I believe this would solve your pain point of only seeing bid and ask data when a transaction is in play. This will give you everything.

Just set a variable for holding price updates and one for volume updates. For example


if( marketDataUpdate.MarketDataType == MarketDataType.Ask)
{
PriceVariable = marketDataUpdate.Price;
VolumeVariable = marketDataUpdate.Volume;
}

If you ran the code above wide open you would hit hundreds of thousands of rows over a period of just a few minutes. So you will likely want to build some logic to only output key updates at key intervals. I like to capture the starting volume and ending volume of every price level along with the total added volume total canceled volume and total transacted volume. But there are a ton of other things you can do as well.



3. If you want the transaction updates you can get them like this: (Bid Example below)


if (marketDataUpdate.MarketDataType == MarketDataType.Last )

{
#region Bid Update
if (marketDataUpdate.Price <= marketDataUpdate.Bid)
{

BidTransactionPrice = marketDataUpdate.Price;
BidTransactionVolume = marketDataUpdate.Volume;

}


}

4. If you want to cut down the noise and just get the price level changes you can create a basic if statement to measure a variable against the current new price and if it has changed to output it and if it is the same do nothing. This will print all the changes in sequence.

There are a number of ways to slice and dice this, but if you hack around for a bit you can do a quite a bit yourself. I have never found a source to buy fully developed analysis of the market microstructures so I started building them myself to help me learn what the hell was going on under the hood.

I am always willing to share a few lines of code here and there if there is any interest.

Best of luck!

Ian

In the analytical world there is no such thing as art, there is only the science you know and the science you don't know. Characterizing the science you don't know as "art" is a fools game.
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on February 9, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts