Welcome to the Traders Laboratory Forums.
Market Profile Are you a market profile trader? Post here.

Reply
Old 07-24-2007, 08:57 PM   #9

Join Date: May 2007
Posts: 577
Ignore this user

Thanks: 0
Thanked 28 Times in 18 Posts

Re: Trading with Market Statistics. IV Standard Deviation

working on my EasyLanguage VWAP Std Dev code (tradestation)... gotta figure out the trick to how you do summation of all prices since the opening bar. if someone knows how to do this, please help out. here is what my ES chart looks like today:

http://bp3.blogger.com/_5h-SWVGx6Ms/...+Dev+Bands.bmp
Dogpile is offline  
Reply With Quote
Old 07-24-2007, 09:43 PM   #10

walterw's Avatar

Join Date: Nov 2006
Location: Argentina
Posts: 2,228
Ignore this user

Thanks: 0
Thanked 201 Times in 128 Posts

Re: Trading with Market Statistics. IV Standard Deviation

Quote:
Originally Posted by Dogpile »
working on my EasyLanguage VWAP Std Dev code (tradestation)... gotta figure out the trick to how you do summation of all prices since the opening bar. if someone knows how to do this, please help out. here is what my ES chart looks like today:

http://bp3.blogger.com/_5h-SWVGx6Ms/...+Dev+Bands.bmp
Are you using the VWAP that is on tradestation boards ? and from there on aplying sd ?...
__________________
you must enjoy trading... otherwise you shouldnt trade...
walterw is offline  
Reply With Quote
Old 07-24-2007, 10:20 PM   #11

Join Date: May 2007
Posts: 577
Ignore this user

Thanks: 0
Thanked 28 Times in 18 Posts

Re: Trading with Market Statistics. IV Standard Deviation

<<Are you using the VWAP that is on tradestation boards ? and from there on aplying sd ?...>>

VWAP_H is the code I am using -- tradestation has this as a keyword. indicator can be written simply as:

plot1(vwap_h,"vwap");

--------------

here is how I wrote Std Dev:

first taking the squared difference of 'price' and VWAP_H and summing them:

value1=
square(c-vwap_h)+
square(c[2]-vwap_h[2])+...

then taking square root of value1 gives you std dev, written in EL as:
value2=squareroot(value1/n);

where n is the number of periods...

I just put it up on the tradestation forum to try to get some help:

https://www.tradestation.com/Discuss...Topic_ID=66888

any help here would be appreciated...

Last edited by Dogpile; 07-24-2007 at 10:24 PM.
Dogpile is offline  
Reply With Quote
Old 07-24-2007, 10:34 PM   #12

jperl's Avatar

Join Date: Sep 2006
Location: Rochester,NY
Posts: 359
Ignore this user

Thanks: 2
Thanked 362 Times in 74 Posts

Re: Trading with Market Statistics. IV Standard Deviation

Quote:
Originally Posted by Dogpile »
here is how I wrote Std Dev:

first taking the squared difference of 'price' and VWAP_H and summing them:

value1=
square(c-vwap_h)+
square(c[2]-vwap_h[2])+...

then taking square root of value1 gives you std dev, written in EL as:
value2=squareroot(value1/n);

where n is the number of periods...
Dogpile, you left out an important term in your variance computation. Remember that the VWAP is volume weighted. so you need to weight each one of your square terms by the normalized volume:
value1= Pi*square(c-vwap_h) +..... where Pi= vi/V, vi=volume traded at price c, V=total volume for the distribution.

Also each of the terms in the sum should be the same VWAP :

value1= P1*square(C-VWAP) + P2*square(c[2]-VWAP) + .....
__________________
JERRY

---I'm going to trade til I'm 100, or die trying----

Last edited by jperl; 07-24-2007 at 10:40 PM.
jperl is offline  
Reply With Quote
Old 07-24-2007, 10:58 PM   #13

Join Date: May 2007
Posts: 577
Ignore this user

Thanks: 0
Thanked 28 Times in 18 Posts

Re: Trading with Market Statistics. IV Standard Deviation

thx Jerry,

note that VWAP_H is hard-coded to already volume-weight for that side of the equation.

I assume you are saying that I need to weight each 'price' observation by volume as well to be consistent? hmm, need to think about this more. can you post a chart of your ES 2-min chart with the bands for today? I would like to see how mine and yours compare as is...

I have been using VWAP a lot lately and using my short-term trading techniques in conjunction with VWAP has so far been awesome -- and I will be thinking a lot about more ideas with VWAP. Look how NQ stopped just short of previous days VWAP again near 55.00 to offer a spot to look for a key reversal... this was sweet since my short-term entry techniques didn't signal a short until then anyway -- but gave extra confidence that this was actually typical behavior for the very volatile NQ contract.
Dogpile is offline  
Reply With Quote
Old 07-24-2007, 11:05 PM   #14

Join Date: May 2007
Posts: 577
Ignore this user

Thanks: 0
Thanked 28 Times in 18 Posts

Re: Trading with Market Statistics. IV Standard Deviation

<<Also each of the terms in the sum should be the same VWAP :

value1= P1*square(C-VWAP) + P2*square(c[2]-VWAP) + .....>>

this is not intutive to me... I would then be comparing the current vwap to old prices..

I am thinking about how bollinger bands work here and applying same concept. I am quite familiar with properties of bollinger bands so this is natural for me. bollinger bands compare the price to the moving average value that occured at the same time that the price occured. this is kind of like 'matching' concept in accounting.

I do not know how to code it your way so will look for others for help. But this entire line of thinking is quite stimulating for new ideas.
Dogpile is offline  
Reply With Quote
Old 07-25-2007, 12:19 AM   #15

Join Date: Jan 2007
Location: san jose
Posts: 90
Ignore this user

Thanks: 0
Thanked 5 Times in 5 Posts

Re: Trading with Market Statistics. IV Standard Deviation

Jerry,
I am also confused with
"Also each of the terms in the sum should be the same VWAP" statement.

Vwap is developing during the day, and is a sum of (pi * vi)/ V. It would seem that SD equitation should have VWAPi and be summed at each bar. So one would get distribution of prices in reference to VWAP line.
nickm001 is offline  
Reply With Quote
Old 07-25-2007, 05:23 AM   #16

Nick1984's Avatar

Join Date: Dec 2006
Location: Melbourne, Australia
Posts: 432
Ignore this user

Thanks: 2
Thanked 9 Times in 6 Posts

Re: Trading with Market Statistics. IV Standard Deviation

I like the strategy that you use but the only thing that I seem to find a bit wrong with it is that you seem to really need to wait a long time for the volume distribution function to develop i.e: you have to wait a long time in the trading day to actually do anything.

Can you add in another factor into your analysis, specifically time? Question being, if you factor in time then you can do a regression analysis based on price, volume, and time so that you can get a probability distribution (90% confidence intervals) to help time trades early on in the trading session.

I might be wrong but it's just an idea
__________________
Nick Constantin

Always look on the bright side of life...da da da da da da da da da - Monty Python
Nick1984 is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trading With Market Statistics.II The Volume Weighted Average Price (VWAP). jperl Market Profile 65 02-25-2012 04:02 PM
Trading With Market Statistics I. Volume Histogram jperl Market Profile 36 02-21-2012 06:23 PM
Trading with Market Statistics III. Basics of VWAP Trading jperl Market Profile 73 01-03-2012 08:06 AM
Standard deviations & Odds rayk Market Profile 2 10-07-2006 11:13 AM
Trading in a Dull Market Soultrader Technical Analysis 0 09-06-2006 11:44 AM

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