Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

Frank

Less Compute Intensive Way to Track Volume

Recommended Posts

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.

 

attachment.php?attachmentid=14374&stc=1&d=1255973194

5aa70f3f30ad4_PVPImage.thumb.png.0dd2735225e742ee260600d54847040b.png

Share this post


Link to post
Share on other sites

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;

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.