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

Reply
Old 07-06-2009, 06:12 AM   #9

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: Vwap Hourly

Here's a 50 contract constant volume chart with resets every hour.
Attached Thumbnails
Vwap Hourly-dax_vwap1.png  
BlowFish is offline  
Reply With Quote
The Following 2 Users Say Thank You to BlowFish For This Useful Post:
Tams (07-06-2009), Trader333 (07-08-2009)
Old 07-08-2009, 09:06 AM   #10

shrike's Avatar

Join Date: Jun 2009
Location: fantasy
Posts: 85
Ignore this user

Thanks: 44
Thanked 24 Times in 22 Posts

Re: Vwap Hourly

hi
thanks to everyone , i'm working on your advice
shrike is offline  
Reply With Quote
Old 08-04-2009, 07:41 PM   #11

Join Date: Mar 2009
Location: Edmonton
Posts: 4
Ignore this user

Thanks: 2
Thanked 0 Times in 0 Posts

Re: Vwap Hourly

This is an awesome indicator!

Flowing this thread this is what i got the script.


Code:
{***********************************************************************************************

Coded by dbntina/boxmeister 8/2/2007

Used the VWAP_H code provided by tradestation on 02/07/2003 Topic ID = 6735 Thanks Guys!

Added the computation for variance and the Standard Deviation to combine into one indicator
plot and this indicator plots the VWAP, SD1 bands and SD2 bands

***********************************************************************************************}



	[LegacyColorValue = true];
	inputs:
	iStartTime (0800),
	ResetMinutes (60);


	
	
	
	


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

	if mod( (TimeToMinutes(time)-TimeToMinutes(iStartTime) ), TimeToMinutes(ResetMinutes) ) = 0 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;

	{Calculate the individual variance terms for each intraday bar starting with the current
	bar and looping back through each bar to the start bar.  The terms are each normalized
	according to the Variance formula for each level of volume at each price bar			}

 	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);


	Plot1(VolWAPValue, "VWAP");
	Plot2(VolWAPValue + VolWAPSD, "VWAP1SDUp");
    Plot3(VolWAPValue - VolWAPSD, "VWAP1SDDown");
	Plot4(VolWAPValue + (2*VolWAPSD), "VWAP2SDUp");
    Plot5(VolWAPValue - (2*VolWAPSD), "VWAP2SDDown");

I wanted to have this indicator plot in RTH only on my 24h tick charts. in Daylight Mountain standard Time it is 7:30am to 14:15pm. I have setup up start time at 7:30 and the reset in minutes to 405min, that should give me the reset at 14:15pm. For some odd reason the indicator would plot till next day 7:30am. Any one know how to fix that?


Other function i would like to incorporate is for the indicator to stop plotting between 14:15 - 7:30 (RTH close to open)


I have inserted iEndTime (1415); but that did not go over too well when came to plotting the indicator.


I would appreciate help on this one.


R
RomanFx 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
Vwap trader273 Open E Cry 4 09-08-2010 06:48 AM
Vwap conr Technical Analysis 4 04-25-2009 09:56 AM
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
IRT and VWAP dupaski Market Profile 2 02-05-2008 03:22 PM

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