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

Reply
Old 01-10-2011, 04:12 PM   #1

ValueTrader's Avatar

Join Date: Sep 2010
Posts: 72
Ignore this user

Thanks: 32
Thanked 16 Times in 12 Posts

VWAP with SD Easy Lang Issues.

HI, I've tried a few VWAP codes in EL on my Global Zen platform with no problems.

The lastet one i've tried:

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(ResetMinute s) = 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");

Comes up with 2 syntax errors and Unsupported attribute 'LeagacyColorVale"

Does anyone know the fix for these, and also can anyone reccomend a site to learn EL coding.

Thanks
VT
ValueTrader is offline  
Reply With Quote
Old 01-10-2011, 09:07 PM   #2

ValueTrader's Avatar

Join Date: Sep 2010
Posts: 72
Ignore this user

Thanks: 32
Thanked 16 Times in 12 Posts

Re: VWAP with SD Easy Lang Issues.

Panic over, i've solved it now. If anyone would like the completed code (Easy Language for Open E Cry) let me know.

VT
ValueTrader is offline  
Reply With Quote
Old 01-11-2011, 08:18 AM   #3

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: VWAP with SD Easy Lang Issues.

Quote:
Originally Posted by ValueTrader »
Panic over, i've solved it now. If anyone would like the completed code (Easy Language for Open E Cry) let me know.

VT
why don't you just post the code.
this is a mutual community, that's why you came here in the first place.
(unless you are fishing for contact names)



ps. pls use code tag to wrap the code
it is the # sign above the message window.

tagged code looks like this:

Code:
LegacyColorValue = true]; 

inputs: 
    VolWAPValue(0), 
    VolWAPVariance(0), 
    VolWAPSD(0); 

if TimeToMinutes(ResetMinute_s) = 0 then 
begin 
    PriceW = 0;
end;
__________________



Only an idiot would reply to a stupid post

Last edited by Tams; 01-11-2011 at 08:24 AM.
Tams is offline  
Reply With Quote
Old 01-11-2011, 11:29 AM   #4

ValueTrader's Avatar

Join Date: Sep 2010
Posts: 72
Ignore this user

Thanks: 32
Thanked 16 Times in 12 Posts

Re: VWAP with SD Easy Lang Issues.

[QUOTE=Tams;109513]why don't you just post the code.
this is a mutual community, that's why you came here in the first place.
(unless you are fishing for contact names)

Not sure if you're being rude in a friendly way, or friendly in a rude way.

I'll post the code and look forward the remarks that make coming these forums such a fun and rewarding experiance.

Code:
vars: vwap(0),
pv(0),
Totalvolume(0),
Barfromstart(0),
Squareddeviations(0),
Probabilityweighteddeviations(0),
deviationsum(0),
standarddeviation(0);
If date > date[1] 
then 
begin
Barfromstart=0;
pv=AvgPrice*volume;
Totalvolume=volume;
vwap=pv/totalvolume;
end
else
begin
Barfromstart=Barfromstart[1]+1;
pv=pv[1] + AvgPrice*Volume;
Totalvolume=Totalvolume[1] + Volume;
vwap=pv/Totalvolume;
end;
deviationsum=0;
for value1= 0 to Barfromstart
begin
Squareddeviations=Square( vwap-avgprice[value1]);
Probabilityweighteddeviations=volume[value1]*Squareddeviations/Totalvolume;
deviationsum=deviationsum +Probabilityweighteddeviations;
end;

standarddeviation=SquareRoot(deviationsum); 
Plot1(vwap);
Plot2(vwap+standarddeviation);
Plot3(vwap+2*standarddeviation);
Plot4(vwap-standarddeviation);
Plot5(vwap-2*standarddeviation);
ValueTrader is offline  
Reply With Quote
The Following 3 Users Say Thank You to ValueTrader For This Useful Post:
EasyTrader_I (01-12-2011), MilesT (03-25-2012), Tams (01-11-2011)
Old 01-11-2011, 01:14 PM   #5

Join Date: Jul 2009
Location: Hfj
Posts: 3
Ignore this user

Thanks: 0
Thanked 1 Time in 1 Post

Re: VWAP with SD Easy Lang Issues.

Hi,

I saw your EL code for the VWAP/SDs and imported it to OEC. Is this study similar to Jerry´s study, found under the Trading with Market Statistics threads here at TL.com?

Is it for tick-by-tick or 2m? At what time do you start the study?

I am using Jerry´s study in Ensign and want to compare it to yours.

Regards,
Halli.
Halli101 is offline  
Reply With Quote
Old 01-11-2011, 04:31 PM   #6

ValueTrader's Avatar

Join Date: Sep 2010
Posts: 72
Ignore this user

Thanks: 32
Thanked 16 Times in 12 Posts

Re: VWAP with SD Easy Lang Issues.

Quote:
Originally Posted by Halli101 »
Hi,

I saw your EL code for the VWAP/SDs and imported it to OEC. Is this study similar to Jerry´s study, found under the Trading with Market Statistics threads here at TL.com?

Is it for tick-by-tick or 2m? At what time do you start the study?

I am using Jerry´s study in Ensign and want to compare it to yours.

Regards,
Halli.
I use it on a 5min as i find 2 min far too noisy for my requirements.

I do not use it in the same way as Jerry (although his posts and videos are excellent) For me it is an extra tool in an holostic approach to trading and market structure.

The study will start at the same time as your default market start times on the OEC platform.

By posting this code i am in no way reccomending its use in any particular way.
best to paper trade it first to suit your own style.

Best of Luck

VT
ValueTrader is offline  
Reply With Quote
Old 01-13-2011, 09:19 AM   #7

Join Date: Dec 2010
Posts: 103
Ignore this user

Thanks: 3
Thanked 7 Times in 7 Posts

Re: VWAP with SD Easy Lang Issues.

Hi,

i try to plot a continuos vwap avoid that it resets every new day.

I am speaking something like n vwap

TradeStation Indicator VWAP N Day & SD Bands

Could any coders help me please?!
bomberone1 is offline  
Reply With Quote
Old 01-17-2011, 07:39 PM   #8

Join Date: Dec 2010
Posts: 103
Ignore this user

Thanks: 3
Thanked 7 Times in 7 Posts

Re: VWAP with SD Easy Lang Issues.

no one??? please is there a coder that could help me please
bomberone1 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
Having Issues Posting tradergurl Support Center 9 02-11-2011 09:01 AM
SST General Issues AlanP Ultimate Trade Analyzer 8 10-14-2010 11:01 PM
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
IB Login issues wsam29 Brokers and Data Feeds 2 05-22-2007 04:30 PM

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