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)
I'm a bit timid about posting such a newbie question, but newbie I am. I am on NinjaTrader 7 and looking at the ES. Still in diapers... er demo accounts.
The basic question is: How does one classify a trade as a "Sell" or a "Buy"? Every trade has a buyer and a seller. Is it compared to the last "Ask" or "Bid" no matter how off the wall their price might have been? Or should it be compared to the current "Ask" / "Bid" Depth of Market book?
The remaining portion of this note is what I was doing when I discovered a perceived inconsistency in BuySellVolume and provides some detail into the technicalities.
I created a NT strategy that built the "DOM" book from the Lvl 2 OnMarketDepth data. I validated that my results and what were shown on NT's SuperDOM were consistent. I then proceeded to classify the "Last" transaction's Price to what was in the Lvl2 book I had created and declare the trade as a "Buy" or a "Sell". I had examined the code from the NT BuySellVolume indicator and can see that if a bar has a Close price greater or equal to "GetCurrentAsk" price, then the trade is classified as a "Buy". Likewise if a Close price is less or equal to "GetCurrentBid" price, then it's classified as a "Sell".
This even made sense. Looking at the NT SuperDom I see the Ask prices ascending on the right and the Bid prices descending on the left. Clearly, says I, a trade made in the Ask price regions is a Buyer motivated to acquire and places a bid at a higher price - a "Buy". Likewise a trade made in the Bid regions is a Seller willing to take a lower price - a "Sell".
Is this basic thought correct or am I off-base somehow?
So I fire up my strategy to dump out data and see what I get. Somewhere along the way I see this big volume spike and decide to investigate. I haz lots data! BuySellVolume shows it as green (a buy) on a 5 tick chart. I find the entry in the flood of data I had generated and see that I had actually classified this trade as a "Sell". Whoa Nelly, something isn't right!
With the wonders of market reply, I dump out a gob of data and look to see what's what. I find that the Lvl2 book is current and that the last update to the base ask position (lowest ask price) is 2,058.25. Shortly thereafter there is an "Ask" @ 2,058.00 in the Lvl 1 data followed immediately by a "Last" @ 2,058.00.
This "Last" price is the ceiling/highest of the "Bid" DOM.
What I see is that a seller dumpped in an Ask with a fair sized volume attached to it and that it immediately traded because it was in the "Bid" region - hungy buyers were waiting. I therefore classified this as a "Sell" because the Seller was motivated enough to sell at a price lower than the lowest outstanding Ask price.
However the BuySellVolume classified this a "Buy" because trade price 2058.00 is "Greater than or equal to" GetCurrentAsk of 2058.00.
So, I'm reaching out to the crew here and looking for some edjumacation. What gives? Is my understanding on how to classify wrong? Is BuySellVolume wrong? What's the correct way to classify a trade as "Buy" or "Sell" ?
Output from dump:
Time 3/18/2015 8:46:15 AM, OnMarketDepth, Type Ask, Operation Update, Position 0, Price 2,058.25, Volume 197
<snip>
Time 3/18/2015 8:46:16 AM, OnMarketData, Type Ask, Price 2,058.00, Volume 535
Time 3/18/2015 8:46:16 AM, OnMarketData, Type Last, Class Sell, Price 2,058.00, Volume 487, AskPrice[0] 2,058.25, AskDepth[0] 197, BidPrice[0] 2,058.00, BidDepth[0] 465
-g
Can you help answer these questions from other members on NexusFi?
Using changes in market depth (bids, asks, their size and position) is misleading when trading using order flow.
You are better off focusing on absorption of orders if you want order flow to be your main tool. As you noted, every buy is another's sell but there are patterns based on studying the relationship of orders hitting the bid or ask and the resulting effect on price that may help you in your trading.
I would recommend watching the webinar series by Peter Davies of Jigsaw Trading. There are 3 webinars on this topic. In my opinion, that is the best education you can get on order flow and its uses.
To answer your question on how to programatically classify a buy or a sell (I prefer calling it up/down tick/volume instead of buy/sell): if a trade occurs above the last trade, thats classified as uptick (upvolume), if its below the last trade then its a downtick (downvolume) and if its equal to the last trade, then its the same as the previous tick (volume) up or down. A futures.io (formerly BMT) member, Gomi, has created a suite of indicators for NT that may help you with this. You can lookup his work.
I can see that, Thanks! Also, I'll be looking into the referenced material.
Just started on Adam Grimes' material from a webinar recently held here.
What paper trading I'm doing is focused on learning about the market. I'm currently working on understanding what folks are talking about and why it's important. I was intrigued by the random lines idea. Maybe that's why hindsight is so 20/20. We make it fit our pre-conceptions. Grimes' approach to statistically test our tools is a great reality check. Now to figure out how to do it.
Thanks to everyone here. Lots and lots of great reading.