Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 10-19-2009, 02:27 PM   #1

Join Date: Jan 2008
Location: San Francisco
Posts: 394
Ignore this user

Thanks: 17
Thanked 338 Times in 156 Posts



Less Compute Intensive Way to Track Volume

I am posting this in this forum in hopes someone can make the code more efficient. It runs in Open Ecry/Easylanguage --- but it won't run in Tradestation as it seems to be too "compute-intensive" for Tradestation in its current form.

The Idea is to create an estimate of the most heavily traded price of day so that you can chart it historically and see how the volume profile filled out. The concept comes from how VWAP is computed, which is really an estimate of VWAP if done on a chart -- but it is usually within less than 1 tick of actual vwap if you drop down to a 2-min chart or below.

here is the snapshot of the calculation -- note how the line that is created by the code closely matches the volume bars on the right and you can visualize how the volume profile would look if it were not included in the chart.

Attached Thumbnails
Less Compute Intensive Way to Track Volume-pvp-image.png  
Frank is offline  
Reply With Quote
Old 10-19-2009, 02:31 PM   #2

Join Date: Jan 2008
Location: San Francisco
Posts: 394
Ignore this user

Thanks: 17
Thanked 338 Times in 156 Posts



Re: Less Compute Intensive Way to Track Volume

here is the hack-code I came up with. it needs some work ---

BEWARE to Tradestation users, your system might hang if you try to run this on a LTF chart. (and it won't calculate correctly if you run it on Higher Timeframe chart).

vars: firstbar(0), length(0);

if date > 1091015 then begin // <== this is in here so doesn't get locked up in loop looking back past 10/15/09

if date > date[1] then
firstbar=currentbar;
length=currentbar-firstbar;

value1 = (O+H+l+C)/4;
value2 = round2fraction(value1);

value4=mode(value2, length, -1); //the -1 finds the lowest of modes if more than 1 mode price exists

if value4>lowd(0) and time>330 then
plot1(value4);


end;
Frank is offline  
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
This Looks Like a Very Interesting Way to Track Market Sentiment in Realtime. popstocks Trading and the Markets 8 09-14-2010 02:19 PM
[ES] How to Track the Smart Money/institutions After CME Data Changes jeffersondaarcy E-mini Futures Trading Laboratory 34 11-16-2009 10:25 PM
Staying on Track and Pushing for More... brownsfan019 Trading Psychology 19 07-03-2008 04:16 AM
Am I on the right track? OzAsh Options Trading Laboratory 1 03-15-2008 07:35 PM
building a track record? darthtrader Market Analysis 7 06-23-2007 12:19 AM

All times are GMT -4. The time now is 04:58 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.