NexusFi: Find Your Edge


Home Menu

 





Last Trade Size (volume)


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Big Mike with 4 posts (2 thanks)
    2. looks_two Laurus12 with 2 posts (0 thanks)
    3. looks_3 Jura with 1 posts (1 thanks)
    4. looks_4 DrQuantTrader with 1 posts (0 thanks)
    1. trending_up 6,354 views
    2. thumb_up 3 thanks given
    3. group 2 followers
    1. forum 8 posts
    2. attach_file 0 attachments




 
Search this Thread

Last Trade Size (volume)

  #1 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,454 since Jun 2009
Thanks Given: 33,227
Thanks Received: 101,646

This should be easy, but I've just spent an hour trying to do it. I know the answer is obvious... but you know how sometimes you just can't see it.

I simply want to know what the Last trade volume was, as in the Last tick, what was the volume traded at that price. I need to know this intrabar.

Help?

@Jura, @SPMC, @Laurus12 to the rescue? Others?

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
How to apply profiles
Traders Hideout
 
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,454 since Jun 2009
Thanks Given: 33,227
Thanks Received: 101,646


Have tried this among 100 other things:

 
Code
                            

vars
:
_lastvol (0),
intrabarpersist _lastvolpersist (0);

_lastvolpersist volume;
_lastvol volume;

print(
text("Volume[0] = "Volume[0], ", _lastvol = "_lastvol", lastvol[1] = "_lastvol[1], ", _lastvolpersist[0] = "_lastvolpersist[0])); 
Sample output:

 
Code
Volume[0] =  123.00, _lastvol =  123.00, lastvol[1] =  137.00, _lastvolpersist[0] =  123.00
Volume[0] =  123.00, _lastvol =  123.00, lastvol[1] =  137.00, _lastvolpersist[0] =  123.00
Have tried all the math, nothing accurately reports the last trade size.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #4 (permalink)
 
Jura's Avatar
 Jura   is a Vendor
 
Posts: 775 since Apr 2010
Thanks Given: 2,352
Thanks Received: 690

Hm, good question Mike.

After some puzzling this seems (with the emphasize on seems) to work:


Quoting 
1110131_121037 LastVol: 1 regularVol: 223 prevVol: 399
1110131_121039 LastVol: 8 regularVol: 231 prevVol: 399
1110131_121042 LastVol: 1 regularVol: 232 prevVol: 399
1110131_121044 LastVol: 6 regularVol: 238 prevVol: 399
1110131_121102 LastVol: 2 regularVol: 240 prevVol: 399
1110131_121110 LastVol: 1 regularVol: 241 prevVol: 399
1110131_121132 LastVol: 2 regularVol: 243 prevVol: 399
1110131_121134 LastVol: 1 regularVol: 244 prevVol: 399
1110131_121143 LastVol: 4 regularVol: 248 prevVol: 399
1110131_121151 LastVol: 4 regularVol: 252 prevVol: 399
1110131_121222 LastVol: 16 regularVol: 268 prevVol: 399
1110131_121238 LastVol: 2 regularVol: 270 prevVol: 399
1110131_121259 LastVol: 4 regularVol: 4 prevVol: 270
1110131_121300 LastVol: 3 regularVol: 7 prevVol: 270
1110131_121304 LastVol: 1 regularVol: 8 prevVol: 270
1110131_121310 LastVol: 3 regularVol: 11 prevVol: 270
1110131_121314 LastVol: 7 regularVol: 18 prevVol: 270
1110131_121320 LastVol: 9 regularVol: 27 prevVol: 270
1110131_121344 LastVol: 12 regularVol: 39 prevVol: 270
1110131_121352 LastVol: 5 regularVol: 44 prevVol: 270
1110131_121402 LastVol: 2 regularVol: 46 prevVol: 270
1110131_121428 LastVol: 8 regularVol: 54 prevVol: 270
1110131_121428 LastVol: 5 regularVol: 59 prevVol: 270
1110131_121434 LastVol: 2 regularVol: 61 prevVol: 270
1110131_121520 LastVol: 3 regularVol: 64 prevVol: 270
1110131_121520 LastVol: 1 regularVol: 65 prevVol: 270

 
Code
                            
vars
    
intrabarpersist lastVolume(0),
    
intrabarpersist volumeLastTrade(0);

once cleardebug;

lastVolume volume volumeLastTrade;

volumeLastTrade volume;
    
if 
lastVolume 0 then begin        // needed because my playback data has ticks with zero volume, somehow
    
    
Print(date:0:0"_"time_s:0:0Spaces(2), 
        
"LastVol: "NumToStr(lastVolume0),             // volume of last tick update
        
" regularVol: "NumToStr(Volume0),            // current volume of the bar, at this point
        
" prevVol: "NumToStr(Volume[1], 0));            // this will plot the volume from the *close* of the previous bar
end;

if 
BarStatus(1) = 2 then begin
    lastVolume 
0;
    
volumeLastTrade 0;
end

Reply With Quote
Thanked by:
  #5 (permalink)
 
Laurus12's Avatar
 Laurus12 
Norway
 
Experience: Advanced
Platform: MultiCharts, CQG, NinjaTrader
Broker: CQG, DTN IQFeed
Trading: EURO
Posts: 376 since Nov 2010
Thanks Given: 564
Thanks Received: 363

Mike. Sorry, but this is now over my head. I'll try to learn something while you guys go forward.

Just so I am sure, did you see my last reply from Curtis?

Laurus

“If you wish to see the truth, then hold no opinions for or against anything.” - Hsin Hsin Ming
Reply With Quote
  #6 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,454 since Jun 2009
Thanks Given: 33,227
Thanks Received: 101,646

I received this from Dave @ MultiCharts. Haven't had a chance to test.

 
Code
                            
var:

    
tick_vol(0),
    
curr_vol(0),
    
intrabarpersist tick_num(0),
    
intrabarpersist prev_vol(0);

curr_vol ticks;
tick_vol curr_vol prev_vol;
tick_num += 1;

once cleardebug;
if 
lastbaronchart then
    
print("Bar = "currentbarspaces(2), "Tick = "tick_num,
spaces(2), "Last tick volume = "tick_vol);

prev_vol curr_vol;
if 
barstatus 2 then tick_num 0
I see both of you used "cleardebug", I am unfamiliar with that and will need to check it out.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #7 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,454 since Jun 2009
Thanks Given: 33,227
Thanks Received: 101,646


Big Mike View Post
I see both of you used "cleardebug", I am unfamiliar with that and will need to check it out.

Clears output log. Cool.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #8 (permalink)
 
Laurus12's Avatar
 Laurus12 
Norway
 
Experience: Advanced
Platform: MultiCharts, CQG, NinjaTrader
Broker: CQG, DTN IQFeed
Trading: EURO
Posts: 376 since Nov 2010
Thanks Given: 564
Thanks Received: 363


Big Mike View Post
Clears output log. Cool.

Mike

Except from that I am now behind, this is very exciting. I'll step back and watch

Edit: And thank you for the clarification on the "Tells"

“If you wish to see the truth, then hold no opinions for or against anything.” - Hsin Hsin Ming
Reply With Quote
  #9 (permalink)
DrQuantTrader
Houston, TX
 
Posts: 8 since Feb 2015
Thanks Given: 3
Thanks Received: 0


Big Mike View Post
Clears output log. Cool.

Mike


Laurus12 View Post
Except from that I am now behind, this is very exciting. I'll step back and watch

Edit: And thank you for the clarification on the "Tells"


Hello Mike, Laurus:
Did the above code work for you? If so, would you be so kind as to post a sample output chart?
Many thanks!

Reply With Quote




Last Updated on July 10, 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