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

Reply
Old 10-25-2008, 07:33 AM   #1

Join Date: Jan 2008
Posts: 28
Ignore this user

Thanks: 5
Thanked 10 Times in 7 Posts

Volatility VS Vwap

vars:
PriceW(0), ShareW(0), Count(0), VolWAPValue(0), VolWAPVariance(0), VolWAPSD(0), aa(0), bb(0);

if date > date[1] then begin
PriceW = 0; ShareW = 0; Count = -1; Value1 = 0; Value2 = 0; VolWAPValue = 0; end;
PriceW = PriceW + (AvgPrice * (UpTicks+DownTicks));
ShareW = ShareW + (UpTicks+DownTicks);
Count = Count + 1;
Value3 = 0;
if ShareW > 0 then VolWAPValue = PriceW / ShareW;
For Value1 = 0 To Count Begin
Value2 = ((UpTicks[Value1]+DownTicks[Value1])/ShareW) * (Square(AvgPrice[Value1]-VolWAPValue));
Value3 = Value3 + Value2;
End;
VolWAPVariance = Value3;
VolWAPSD = SquareRoot(VolWAPVariance );
value1=volwapsd;
value2=(value1[203]+value1[406]+value1[609])/3;
value3=(value1+value2)/2;
value4=value3*2;

Plot1(value1, "vwap");
if time<1100 then begin
Plot2(value2, "3-Day Avg");
end;
if time>1000 then begin
Plot4(4.25,"-");
Plot6(6.25,"+");
end;

condition1=time>630 and time<730;
condition2=time>730 and time<830;
condition3=time>830 and time<930;
condition4=time>930 and time<1030;
condition5=time>1030 and time<1130;
condition6=time>1130 and time<1315;

if condition1 then
setplotcolor(2, blue);
if condition2 then
setplotcolor(2, red);
if condition3 then
setplotcolor(2, blue);
if condition4 then
setplotcolor(2, red);
if condition5 then
setplotcolor(2, blue);
if condition6 then
setplotcolor(2, red);



spyro is offline  
Reply With Quote
The Following User Says Thank You to spyro For This Useful Post:
Trader333 (10-25-2008)
Old 10-25-2008, 12:31 PM   #2

Trader333's Avatar

Join Date: May 2008
Location: UK
Posts: 153
Ignore this user

Thanks: 79
Thanked 24 Times in 20 Posts

Re: Volatility VS Vwap

Thanks for this. Just one thing for TS2Ki users is that there is a maximum of four plots so replace plot6 with plot3 and it should be fine.


Paul
Trader333 is offline  
Reply With Quote
Old 10-27-2008, 03:50 PM   #3

Join Date: Apr 2007
Location: Victoria,Canada
Posts: 535
Ignore this user

Thanks: 43
Thanked 62 Times in 49 Posts

Re: Volatility VS Vwap

? Could you give a description of what exactly this is useful for?

thanks
waveslider 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
Help for SC Indicators VWAP & VWAP Bands Trendup_ Market Profile 3 11-29-2008 10:00 AM
Help for SC Indicators VWAP & VWAP Bands Trendup_ Market Analysis 0 09-20-2008 10:14 PM
Shorting Volatility, Really. Northern boy Money Management 11 09-20-2008 02:43 AM
Sunday Open Volatility snackly Forex Trading Laboratory 4 09-08-2008 11:18 AM
Trading Volatility with Candles TinGull The Candlestick Corner 2 10-17-2007 11:46 AM

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