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)
My ideas is simply cumulate ask volume and bid vol.
I simply have to compare last price with ask or bid price...and so:
if Last Price==Ask Price --> Volume of last price is ASK
if Last Price==Bid Price --> Volume of last price is BID
and I made this code to begin work but have some problem yet.I made other tests but I cannot solve this problem....with this simple function, in the Output Windows I sometime read that "last price" is not equal at askprice or bid price....and this is strange.
You can have many Ask/Bid changes in between getting a Last (actual trade) price so you need to store latest Bid and Ask values in local variables, plus as you say the trade price can be above or below (or in-between (i.e. unclassifiable or neutral)) so your tests should be 'price >= askPrice' or 'price <= bidPrice', and not just ==.
Ok...I am comparing MarketDelta Time and Sales with output windows of mi indicator in ninja and same datafeed IQfeed.
I will post now a screenshot of the results
This is the screenshot where I compare MarketDelta (iqfeed) and Ninja (iqfeed).
I think that there is some problem using getcurrentask() or getcurrentbid() in onmarketdata() function....I make a conceptual error but I haven't found a correct logical working of onmarketdata()
How is a best way to use onmarketdata() ?
I made other test without getcurrentask and getcurrentbid but using
OK....I will test now...good idea....I'm trying to understand the logic....many thanks for now.
I will post the results and screenshot for other interested users.
Many many thanks.....your code seems to work well but I'm still trying to understand the different logical condition in onmarketdata() function.
You used "return;" in ask and bid call.....and so...good idea.
I will tell more