NexusFi: Find Your Edge


Home Menu

 





When is a trade classed as a "Buy" or a "Sell"?


Discussion in Emini and Emicro Index

Updated
    1. trending_up 3,361 views
    2. thumb_up 1 thanks given
    3. group 0 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

When is a trade classed as a "Buy" or a "Sell"?

  #1 (permalink)
 GregLGTP 
Austin, TX
 
Experience: Beginner
Platform: NinjaTrader
Broker: NT Broker
Trading: ES
Posts: 121 since Mar 2015
Thanks Given: 258
Thanks Received: 70

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

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Request for MACD with option to use different MAs for fa …
NinjaTrader
ZombieSqueeze
Platforms and Indicators
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
58 thanks
Battlestations: Show us your trading desks!
55 thanks
NexusFi site changelog and issues/problem reporting
48 thanks
What percentage per day is possible? [Poll]
31 thanks
GFIs1 1 DAX trade per day journal
29 thanks

  #3 (permalink)
 
Hulk's Avatar
 Hulk 
Texas, USA
 
Experience: Advanced
Platform: TT, Custom
Trading: Futures, Spreads
Posts: 369 since May 2014
Thanks Given: 731
Thanks Received: 901


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.

Visit my NexusFi Trade Journal Reply With Quote
The following user says Thank You to Hulk for this post:
  #4 (permalink)
 GregLGTP 
Austin, TX
 
Experience: Beginner
Platform: NinjaTrader
Broker: NT Broker
Trading: ES
Posts: 121 since Mar 2015
Thanks Given: 258
Thanks Received: 70


Hulk View Post
I prefer calling it up/down tick/volume instead of buy/sell

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.

Started this thread Reply With Quote





Last Updated on March 24, 2015


© 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