When is a trade classed as a "Buy" or a "Sell"? - Index Futures Trading | futures.io
futures.io futures trading

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Traders Hideout > Index Futures Trading

When is a trade classed as a "Buy" or a "Sell"?
Started:March 24th, 2015 (02:49 AM) by GregLGTP Views / Replies:285 / 3
Last Reply:March 24th, 2015 (04:14 PM) Attachments:0

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

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

Old March 24th, 2015, 02:49 AM   #1 (permalink)
Greenhorn Trader
Austin, TX
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: NT Broker
Favorite Futures: ES
Posts: 121 since Mar 2015
Thanks: 258 given, 67 received

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

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


Reply With Quote

Old March 24th, 2015, 02:49 AM   #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.


Old March 24th, 2015, 03:02 PM   #3 (permalink)
Elite Member
Texas, USA
Futures Experience: Intermediate
Platform: X_TRADER Pro, Custom
Broker/Data: Nanex, IQFeed
Favorite Futures: Futures, Spreads
Hulk's Avatar
Posts: 199 since May 2014
Thanks: 478 given, 420 received

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.

Reply With Quote
The following user says Thank You to Hulk for this post:

Old March 24th, 2015, 04:14 PM   #4 (permalink)
Greenhorn Trader
Austin, TX
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: NT Broker
Favorite Futures: ES
Posts: 121 since Mar 2015
Thanks: 258 given, 67 received

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.

Reply With Quote


futures.io > Futures Trading, News, Charts and Platforms > Traders Hideout > Index Futures Trading > When is a trade classed as a "Buy" or a "Sell"?

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Buy Programs", "Sell Programs" and PREM Big Mike Traders Hideout 7 September 14th, 2016 07:07 PM
Fantex: buy and sell "stock" of a professional athlete shodson Traders Hideout 1 October 21st, 2013 02:52 AM
Fukushima: "China Syndrome Is Inevitable" ... "Huge Steam Explosions", or "Nuclear Bo Quick Summary News and Current Events 0 November 22nd, 2011 01:50 AM
How to change "Stop Loss" and "Take Profit" in "shElderImpulse" Strategy javed759 NinjaTrader 1 November 1st, 2011 10:44 PM
"mid", "buy", "sell" volumes lokgotkent Traders Hideout 6 September 30th, 2011 01:24 PM

All times are GMT -4. The time now is 10:06 AM.

Copyright © 2016 by 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 2016-10-25 in 0.10 seconds with 19 queries on phoenix via your IP