Forgotten Your Password?
Connect with Facebook
Frequent Questions

Coding Forum Collaborate, receive help, or discuss coding related issues.

Coding Forum Thread, Vwap Hourly in Trading Resources; hi could someone help me to modify the DBVWAP_SD so i can starting it from a prefix hour like 0900 ...
Reply
1 1 Attachment(s)
 
LinkBack Thread Tools Display Modes

Vwap Hourly  

  #1  
Old 07-02-2009, 06:01 PM
shrike's Avatar
shrike
 
Join Date: Jun 2009
Location: fantasy
Posts: 84
Thanks: 40
Thanked 24 Times in 22 Posts
hi
could someone help me to modify the DBVWAP_SD so i can starting it from a prefix hour like 0900 or 1100 , i've tried much times but nothing
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Vwap Hourly  

  #2  
Old 07-02-2009, 07:38 PM
Tams's Avatar
Tams
does not like shills.
 
Join Date: Sep 2008
Location: Geelong
Posts: 2,279
Thanks: 1,282
Thanked 972 Times in 575 Posts
Look for the following code inside the indicator

if date > date[1] then begin


The software evaluates each bar one at a time.
When it reaches a bar that has a different date than the previous bar,
it knows that a new day has begun... and resets the data.


you can change the line to the following:

if time = 0900 then begin

This will do the reset at 0900.




.

Last edited by Tams; 07-02-2009 at 07:44 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Vwap Hourly  

  #3  
Old 07-03-2009, 03:00 AM
shrike's Avatar
shrike
 
Join Date: Jun 2009
Location: fantasy
Posts: 84
Thanks: 40
Thanked 24 Times in 22 Posts
hi
thanks Tams for help , i tried it and work but what i found sometime an error because if i plot it on a range or volume chart sometime where is not a candle at 0900 so or return an error or skip restart when find a candle at 0900 . i try this :
if time = iniz or time =iniz+1 or time =iniz+2 or time =iniz+3 or time =iniz+4 or time =iniz+5 then begin . not elegant but must study more language code

i 've seen one post where you explain a formula with begin_time and end_time , i tried to insert in the code but dont work
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Vwap Hourly  

  #4  
Old 07-03-2009, 04:10 AM
BlowFish's Avatar
BlowFish
.BlowFish
 
Join Date: Mar 2007
Location: In Da House
Posts: 2,840
Thanks: 108
Thanked 822 Times in 562 Posts
Try something like.....

inputs:
iStartTime (0800),
ResetMinutes (60);


if mod( (TimeToMinutes(time)-TimeToMinutes(iStartTime) ), TimeToMinutes(ResetMinute s) ) = 0 then
begin
reset code starts here
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Vwap Hourly  

  #5  
Old 07-03-2009, 02:00 PM
shrike's Avatar
shrike
 
Join Date: Jun 2009
Location: fantasy
Posts: 84
Thanks: 40
Thanked 24 Times in 22 Posts
thanks BlowFish
make some attempts, what do you mean with reset code starts here

maybe replace : if date > date[1] then begin

with

if mod( (TimeToMinutes(time)-TimeToMinutes(iStartTime) ), TimeToMinutes(ResetMinute s) ) = 0 then
begin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Vwap Hourly  

  #6  
Old 07-03-2009, 05:08 PM
BlowFish's Avatar
BlowFish
.BlowFish
 
Join Date: Mar 2007
Location: In Da House
Posts: 2,840
Thanks: 108
Thanked 822 Times in 562 Posts
Yes, thats pretty much it.
You need the two inputs also.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Vwap Hourly  

  #7  
Old 07-04-2009, 09:11 AM
Frank
 
Join Date: Jan 2008
Location: San Francisco
Posts: 394
Thanks: 17
Thanked 332 Times in 156 Posts
one logical way to do this is to create a variable that will store the count for the number of bars since a given time or date.

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

if date > date[1] then begin
firstbar=currentbar;
end;

length=currentbar-firstbar;

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

the above creates a variable called 'firstbar' and stores that information of when the firstbar began so that you can reference it with a second variable 'length'. length is then a changing variable that is the difference between the bar you are on and the first bar of the day. so the code 'average(close,length);' ..... is the simple average close since the day began, counting back more as the number of bars increases. I found this little piece of code very logical.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Vwap Hourly  

  #8  
Old 07-06-2009, 06:00 AM
BlowFish's Avatar
BlowFish
.BlowFish
 
Join Date: Mar 2007
Location: In Da House
Posts: 2,840
Thanks: 108
Thanked 822 Times in 562 Posts
The advantage of the code I posted is that it allows you to specify any start time and any period (in minutes) to perform the reset. This is irrespective of bar type or size. It works too as I use it in my studies
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Vwap Hourly  

  #9  
Old 07-06-2009, 06:12 AM
BlowFish's Avatar
BlowFish
.BlowFish
 
Join Date: Mar 2007
Location: In Da House
Posts: 2,840
Thanks: 108
Thanked 822 Times in 562 Posts
Here's a 50 contract constant volume chart with resets every hour.
Attached Thumbnails
Vwap Hourly-dax_vwap1.png  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 2 Users Say Thank You to BlowFish For This Useful Post:
Tams (07-06-2009), Trader333 (07-08-2009)

Re: Vwap Hourly  

  #10  
Old 07-08-2009, 09:06 AM
shrike's Avatar
shrike
 
Join Date: Jun 2009
Location: fantasy
Posts: 84
Thanks: 40
Thanked 24 Times in 22 Posts
hi
thanks to everyone , i'm working on your advice
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vwap trader273 Open E Cry 1 06-20-2009 04:13 PM
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


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


» »

» Invite Friends