dealing with GetCurrentBidVolume and GetCurrentAskVolume , "long" casting into "int" - futures io
futures io futures trading



dealing with GetCurrentBidVolume and GetCurrentAskVolume , "long" casting into "int"


Discussion in NinjaTrader

Updated by bukkan
      Top Posters
    1. looks_one jmejedi with 2 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 bukkan with 1 posts (0 thanks)
    4. looks_4 NinjaTrader with 1 posts (0 thanks)
    1. trending_up 4,027 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 4 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

dealing with GetCurrentBidVolume and GetCurrentAskVolume , "long" casting into "int"

(login for full post details)
  #1 (permalink)
Lilburn, GA
 
Experience: Beginner
Platform: NinjaTrader
Broker: VelocityFutures/TT
Trading: ES
 
jmejedi's Avatar
 
Posts: 62 since Jan 2011
Thanks: 13 given, 4 received

alright ,,,,,, so ....... "GetCurrentBidVolume" and "GetCurrentAskVolume" ,,,,,,,,,,,,,, returns a "Long" . . . . . . . . . and I am wanting to do the following:

Get the difference between these two . . . and see if the difference is less than X [where is a "int"]


,,,,,,,,,,,,,,,,,,,,,,,,,,,,, wanted to get your recommendations on this (please) ? ? ?


{ want to see how best to deal with this . .


Also ,,,,, any idea why NT made these two return a "Long" instead of a "int" . . . . I would think that a "int" would be enough to account for the normal sizes seen on the Bids & Asks volumes ,,, take for example the ES ,,,,,,,

}




Thanks in advance ,

Jimmy M. Espana

Visit my Facebook Reply With Quote

Can you help answer these questions
from other members on futures io?
Webinar: Linda Bradford Raschke Dealing with August burnout and Trader Camaraderie
The Elite Circle
MT4 Switch All Charts 1 click
Platforms and Indicators
ATR of only green candles
EasyLanguage Programming
Horizontal Line Indicator
Platforms and Indicators
EQIX - Digital REITs - any experiences?
Stocks and ETFs
 
 
(login for full post details)
  #3 (permalink)
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
 
NinjaTrader's Avatar
 
Posts: 1,525 since May 2010
Thanks: 177 given, 2,298 received


Is this what you are looking for?

if (Math.Abs(GetCurrentAskVolume(0) - GetCurrentBidVolume(0)) < x)
// Do something

Also, an "int" was not large enough in some cases for volume, specifically stocks.

Reply With Quote
 
(login for full post details)
  #4 (permalink)
Lilburn, GA
 
Experience: Beginner
Platform: NinjaTrader
Broker: VelocityFutures/TT
Trading: ES
 
jmejedi's Avatar
 
Posts: 62 since Jan 2011
Thanks: 13 given, 4 received

question about


Math.Abs( )


... does this return a "int" ?

furthermore, Math.Abs can deal with "long"s and "double"s .... right ??

for example:

Y = Y - Math.Abs(DOUBLE);

(where Y is a "int")



Thanks in advance,

Jimmy Espana

Visit my Facebook Reply With Quote
 
(login for full post details)
  #5 (permalink)
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 268 received

int BidAskDiff = (int)(GetCurrentAskVolume() - GetCurrentBidVolume());

do note this may result in -ive value. if you do not want a -ive value then do use Math.Abs as Ray mentioned.

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > dealing with GetCurrentBidVolume and GetCurrentAskVolume , "long" casting into "int"


May 23, 2011


Upcoming Webinars and Events
 

Dealing with burnout w/Linda Bradford Raschke

Elite only
     



Copyright © 2020 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