Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Custom Bar Type using Market Data and/or Market Depth
I have no experience in coding custom bars, however I am really interested in creating a custom bar type for Order Flow statistical analysis. What I want to do is create a new bar for each unique spread(Bid Ask combination) in order to be able to run analysis on what the book is doing and how price is reacting to it. There are two issues that I have no idea how to approach:
1) How can I access the current Ask and current Bid in a custom bar type?
2) How can I change the logic of the bars for historical data, because obviously bid/ask data will not be available.
Anyone have any pointers?
London Calling
Can you help answer these questions from other members on NexusFi?
I'm not sure you will accomplish much with the exercise.
But you really don't need a custom bar type to do this.
If you write/buy an indicator to display the bid/ask on each bar it will look something like this:
The bid/ask totals are shown on each bar beside the bar.
The bottom is the total for that bar with percent bid/ask displayed.
This indicator can also show a graphic histogram on the bar if desired.
This uses a 1 Range bar type.
The reason it is on a special bar type (Rich Range) is because the indicator I have only works on that bar type.
There are many examples in current indicators about accessing the bid/ask totals.
Look in some real time indicators to find the answer.
Usually the routines are in the
areas in the indicators
FWIW
Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
@DavidHP thanks for your input. I know how to access and use all this information through an indicator, however, I was looking for a bar that is unique to a spread combination.
An example of why a 1 range bar won't work for my needs is as follows:
Say the current spread on the ES is 1517.75/1518.00. If the spread changes to 1518.00/1518.25, but the offer is not hit, a new bar will not be formed. I want a new bar to form as soon as the spread changes.
I want to run a study on orders being added/pulled to the bid and offer, and its reaction to trades hitting them. My idea is to create bars similar to CD, but instead bid/offer contracts. However, this is useless unless each bar is only one spread. I pay attention to order flow a lot, and this is something I track in my head, but being able to have it on a chart would be helpful.