Custom Bar Type using Market Data and/or Market Depth - NinjaTrader Programming | futures io social day trading
futures io futures trading


Custom Bar Type using Market Data and/or Market Depth
Updated: Views / Replies:1,411 / 5
Created: by Xav1029 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
 

Custom Bar Type using Market Data and/or Market Depth

  #1 (permalink)
Elite Member
Tampa, FL
 
Futures Experience: Beginner
Platform: NinjaTrader, Sierra Chart
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: 6E, M6E, 6J
 
Xav1029's Avatar
 
Posts: 1,374 since Dec 2011
Thanks: 1,452 given, 3,354 received

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
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)
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



Xav1029 View Post
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?


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:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

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
 
Code
OnMarketData
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 ! ! !
Reply With Quote
The following user says Thank You to DavidHP for this post:
 
  #4 (permalink)
Elite Member
Tampa, FL
 
Futures Experience: Beginner
Platform: NinjaTrader, Sierra Chart
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: 6E, M6E, 6J
 
Xav1029's Avatar
 
Posts: 1,374 since Dec 2011
Thanks: 1,452 given, 3,354 received


DavidHP View Post
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:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

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
 
Code
OnMarketData
areas in the indicators

FWIW

@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.

London Calling
Reply With Quote
 
  #5 (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

That is what 1 Range does

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


But I'm sure you will need to discover this for yourself...
So good luck in your journey.

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Reply With Quote
 
  #6 (permalink)
Elite Member
Tampa, FL
 
Futures Experience: Beginner
Platform: NinjaTrader, Sierra Chart
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: 6E, M6E, 6J
 
Xav1029's Avatar
 
Posts: 1,374 since Dec 2011
Thanks: 1,452 given, 3,354 received


DavidHP View Post
That is what 1 Range does

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


But I'm sure you will need to discover this for yourself...
So good luck in your journey.

@DavidHP are rich range bars what I'm looking for? Here is what I get on a 1 range bar:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Edit: Also, the bar you have an oval around should be two bars for what I'm looking to do.

London Calling
Reply With Quote

Reply



futures io > > > > > Custom Bar Type using Market Data and/or Market Depth

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
Custom bar type - built based on filtered block size Big Mike NinjaTrader Programming 12 March 11th, 2014 12:18 AM
Custom bar type does not appear in NT's list josh NinjaTrader 4 January 16th, 2013 07:43 PM
Wicked Renko custom bar type for NT7 aslan NinjaTrader Programming 25 March 10th, 2012 11:13 AM
Depth of Market and Accumulated Volume Cudashark ThinkOrSwim Programming 5 December 18th, 2011 06:20 PM
add custom bar type to chart selection SARdynamite NinjaTrader Programming 15 July 8th, 2010 11:53 AM


All times are GMT -4. The time now is 09:55 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.11 seconds with 20 queries on phoenix via your IP 54.221.93.187