VWAP Oscillator (StDeV based)
VWAP Oscillator (StDeV based)
Hello,
I recently encountered this VWAP Oscillator (screenshot attached). Would any of you happen to have the EL code of it?
Regards
I recently encountered this VWAP Oscillator (screenshot attached). Would any of you happen to have the EL code of it?
Regards
- Attachments
-
- VWAP_Oscillator.png
- (28.46 KiB) Downloaded 6232 times
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: VWAP Oscillator (StDeV based)
it is already in MC.Hello,
I recently encountered this VWAP Oscillator (screenshot attached). Would any of you happen to have the EL code of it?
Regards
Look for VWAP Reset in the indicator list.
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Hello TJ,
Thanks a lot:-) I will experiment with your code to see if crossing of this VWAP_Osc with another oscilator would bring promising signals. Please see the attached screenshot.
As far as I remember the original VWAP Oscillator's levels are standard deviations of the daily VWAP. It was inpired by this code:
Thanks
Thanks a lot:-) I will experiment with your code to see if crossing of this VWAP_Osc with another oscilator would bring promising signals. Please see the attached screenshot.
As far as I remember the original VWAP Oscillator's levels are standard deviations of the daily VWAP. It was inpired by this code:
Code: Select all
{***********************************************************************************************
Coded by dbntina/boxmeister 8/2/2007
Used the VWAP_H code provided by TS 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];
vars:
PriceW(0),
ShareW(0),
Count(0),
VolWAPValue(0),
VolWAPVariance(0),
VolWAPSD(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;
{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");
// added by request http://www.traderslaboratory.com/forums/f46/vwap-indicator-with-1sd-and-2sd-2175.html#post27273
input : trdSD (2.5);
Plot6(VolWAPValue + (trdSD*VolWAPSD), "VWAP3SDUp");
Plot7(VolWAPValue - (trdSD*VolWAPSD), "VWAP3SDDown");
- Attachments
-
- VWAP_OSC.jpg
- (125.13 KiB) Downloaded 5725 times
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
T: Your Christmas present.
enjoy
enjoy
Code: Select all
// Type : Function
// Name : VWAP_H
vars:
PriceW(0),
ShareW(0),
Answer(0);
if date > date[1] then begin
PriceW = 0;
ShareW = 0;
end;
PriceW = PriceW + (AvgPrice * (UpTicks+DownTicks));
ShareW = ShareW + (UpTicks+DownTicks);
if ShareW > 0 then
Answer = PriceW / ShareW;
VWAP_H = Answer;
Code: Select all
// VWAP Std Dev
vars: aa(0);
value1=
square(c-vwap_h)+
square(c[1]-vwap_h)+
square(c[2]-vwap_h)+
square(c[3]-vwap_h)+
square(c[4]-vwap_h)+
square(c[5]-vwap_h)+
square(c[6]-vwap_h)+
square(c[7]-vwap_h)+
square(c[8]-vwap_h)+
square(c[9]-vwap_h)+
square(c[10]-vwap_h)+
square(c[11]-vwap_h)+
square(c[12]-vwap_h)+
square(c[13]-vwap_h)+
square(c[14]-vwap_h)+
square(c[15]-vwap_h)+
square(c[16]-vwap_h)+
square(c[17]-vwap_h)+
square(c[18]-vwap_h)+
square(c[19]-vwap_h)+
square(c[20]-vwap_h)+
square(c[21]-vwap_h)+
square(c[22]-vwap_h)+
square(c[23]-vwap_h)+
square(c[24]-vwap_h)+
square(c[25]-vwap_h)+
square(c[26]-vwap_h)+
square(c[27]-vwap_h)+
square(c[28]-vwap_h)+
square(c[29]-vwap_h)+
square(c[30]-vwap_h)+
square(c[31]-vwap_h)+
square(c[32]-vwap_h)+
square(c[33]-vwap_h)+
square(c[34]-vwap_h)+
square(c[35]-vwap_h)+
square(c[36]-vwap_h)+
square(c[37]-vwap_h)+
square(c[38]-vwap_h)+
square(c[39]-vwap_h)+
square(c[40]-vwap_h)+
square(c[41]-vwap_h)+
square(c[42]-vwap_h)+
square(c[43]-vwap_h)+
square(c[44]-vwap_h);
value2=squareroot(value1/(45-1));
value3=vwap_h+value2;
value4=vwap_h-value2;
value5=vwap_h+(value2*2);
value6=vwap_h-(value2*2);
value7=vwap_h+2.50;
value8=vwap_h-2.50;
if time>930 and time<1615 then begin
{Plot1(vwap_h, "VWAP" ) ;}
Plot2(value7, "UpperBand" ) ;
Plot3(value8, "UpperBand" ) ;
Plot4(value5, "UpperBand" ) ;
Plot5(value6, "LowerBand" ) ;
end;
- RobotMan
- Posts: 375
- Joined: 12 Jul 2006
- Location: Los Altos, California, USA
- Has thanked: 31 times
- Been thanked: 13 times
- Contact:
I don't come in here too often, but I was going to post some code today and noticed this thread.
There is a pretty good discussion of VWAP and Std Dev on the TradersLaboratory site. I have read through it and I DO use VWAP as a Moving Average S/R point on the chart, but not all the other stuff he talks about.
01 Trading With Market Statistics I. Volume Histogram
http://www.traderslaboratory.com/forums ... -1962.html
02 Trading With Market Statistics.II The Volume Weighted Average Price (VWAP)
http://www.traderslaboratory.com/forums ... -1990.html
03 Trading with Market Statistics III. Basics of VWAP Trading
http://www.traderslaboratory.com/forums ... -2008.html
04 Trading with Market Statistics. IV Standard Deviation
http://www.traderslaboratory.com/forums ... -2101.html
05 Trading with Market Statistics V. Other Entry Points
http://www.traderslaboratory.com/forums ... -2130.html
06 Trading with Market Statistics VI. Scaling In and Risk Tolerance
http://www.traderslaboratory.com/forums ... -2189.html
07 Trading with Market Statistics VII. Breakout Trades at the PVP
http://www.traderslaboratory.com/forums ... -2232.html
08 Trading with Market Statistics VIII. Counter Trend Trades in Symmetric Distributions
http://www.traderslaboratory.com/forums ... -2285.html
09 Trading with Market Statistics IX. Scalping
http://www.traderslaboratory.com/forums ... -2322.html
10 Trading with Market Statistics X. Position Trading
http://www.traderslaboratory.com/forums ... -2423.html
11 Trading with Market Statistics XI. HUP
http://www.traderslaboratory.com/forums ... -2735.html
VWAP Indicator with 1SD and 2SD bands
http://www.traderslaboratory.com/forums ... -2175.html
Some useful explanation and code here (you might need to be registered to get into the forum - sorry):
TS Forum - VWAP Standard Deviation Since Open -- Question
https://www.TS.com/Discussion ... c_ID=66875
TS Forum - Volume At Price Histogram (Futures)
https://www.TS.com/Discussion ... c_ID=67207
TS Forum - gkMtkProfileTL
https://www.TS.com/Discussion ... c_ID=50398
There is a pretty good discussion of VWAP and Std Dev on the TradersLaboratory site. I have read through it and I DO use VWAP as a Moving Average S/R point on the chart, but not all the other stuff he talks about.
01 Trading With Market Statistics I. Volume Histogram
http://www.traderslaboratory.com/forums ... -1962.html
02 Trading With Market Statistics.II The Volume Weighted Average Price (VWAP)
http://www.traderslaboratory.com/forums ... -1990.html
03 Trading with Market Statistics III. Basics of VWAP Trading
http://www.traderslaboratory.com/forums ... -2008.html
04 Trading with Market Statistics. IV Standard Deviation
http://www.traderslaboratory.com/forums ... -2101.html
05 Trading with Market Statistics V. Other Entry Points
http://www.traderslaboratory.com/forums ... -2130.html
06 Trading with Market Statistics VI. Scaling In and Risk Tolerance
http://www.traderslaboratory.com/forums ... -2189.html
07 Trading with Market Statistics VII. Breakout Trades at the PVP
http://www.traderslaboratory.com/forums ... -2232.html
08 Trading with Market Statistics VIII. Counter Trend Trades in Symmetric Distributions
http://www.traderslaboratory.com/forums ... -2285.html
09 Trading with Market Statistics IX. Scalping
http://www.traderslaboratory.com/forums ... -2322.html
10 Trading with Market Statistics X. Position Trading
http://www.traderslaboratory.com/forums ... -2423.html
11 Trading with Market Statistics XI. HUP
http://www.traderslaboratory.com/forums ... -2735.html
VWAP Indicator with 1SD and 2SD bands
http://www.traderslaboratory.com/forums ... -2175.html
Some useful explanation and code here (you might need to be registered to get into the forum - sorry):
TS Forum - VWAP Standard Deviation Since Open -- Question
https://www.TS.com/Discussion ... c_ID=66875
TS Forum - Volume At Price Histogram (Futures)
https://www.TS.com/Discussion ... c_ID=67207
TS Forum - gkMtkProfileTL
https://www.TS.com/Discussion ... c_ID=50398
- Attachments
-
- VWAP20081226.jpg
- (79.28 KiB) Downloaded 5477 times
Hello RobotMan,There is a pretty good discussion of VWAP and Std Dev on the TradersLaboratory site. I have read through it and I DO use VWAP as a Moving Average S/R point on the chart, but not all the other stuff he talks about.
I agree the discussion there is pretty good. Unfortunately MC doesn't plot a daily histogram the way other charting programmes do. In fact MC doesn't plot daily volume histogram at all. So I was not able to benefit from this discussion
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
numeric.Hello TJ,
Thank you very much for the present
Is the VWAP_H function: a) Numeric / b) TrueFalse / c) String?
Regards
you can see it by:
Code: Select all
vars:
Answer(0); // <--numeric
VWAP_H = Answer; // <--- the function returns this variable.
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
too bad I can't get into the TS forum......
Some useful explanation and code here (you might need to be registered to get into the forum - sorry):
TS Forum - VWAP Standard Deviation Since Open -- Question
https://www.TS.com/Discussion ... c_ID=66875
TS Forum - Volume At Price Histogram (Futures)
https://www.TS.com/Discussion ... c_ID=67207
TS Forum - gkMtkProfileTL
https://www.TS.com/Discussion ... c_ID=50398
can someone make a precis?
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Roboman...I don't come in here too often, but I was going to post some code today and noticed this thread.
There is a pretty good discussion of VWAP and Std Dev on the TradersLaboratory site. I have read through it and I DO use VWAP as a Moving Average S/R point on the chart, but not all the other stuff he talks about.
Thanks for the links... that's a wealth of information!
Thanks TJ,numeric.Hello TJ,
Thank you very much for the present
Is the VWAP_H function: a) Numeric / b) TrueFalse / c) String?
Regards
you can see it by:
vars:
Answer(0); <--numeric
VWAP_H = Answer; <--- the function returns this variable.
This indicator works like per attached screenshot (from zero to zillions). Do you think anything could be done to to make these lines oscillate (between 0 to 100 or between 20 to 80 or between -100 to 100 or between a similar range of values)?
- Attachments
-
- VWAP st dev osc.jpg
- (126.58 KiB) Downloaded 5430 times
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
mmm... this indicator is like a bollinger band.Thanks TJ,
This indicator works like per attached screenshot (from zero to zillions). Do you think anything could be done to to make these lines oscillate (between 0 to 100 or between 20 to 80 or between -100 to 100 or between a similar range of values)?
I don't think it was meant to oscillate between 0-100.
I will take a look at other indicators in roboman's links.
-
- Posts: 310
- Joined: 02 Nov 2010
- Has thanked: 26 times
- Been thanked: 23 times
Re: VWAP Oscillator (StDeV based)
Folks, anyone compare vwap by twap?
I have difficult coding twap indicator in easylanguage, anyone get it?
I have difficult coding twap indicator in easylanguage, anyone get it?
-
- Posts: 310
- Joined: 02 Nov 2010
- Has thanked: 26 times
- Been thanked: 23 times
Re: VWAP Oscillator (StDeV based)
TJ i don't understand the modification that u did at original code on Trsor , the code of dbtina vwap_H, could u exaplin please?
Twap are u able to code it?
Twap are u able to code it?
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: VWAP Oscillator (StDeV based)
you need to learn to walk before run.TJ i don't understand the modification that u did at original code on Trsor , the code of dbtina vwap_H, could u exaplin please?
I would suggest you to go through this ebook first:
Getting Started with EasyLanguage
https://www.multicharts.com/multicharts ... mentation/
this is the book you should read if you want to use EasyLanguage but don't know how.
yes.Twap are u able to code it?
how much would you like to pay?
-
- Posts: 310
- Joined: 02 Nov 2010
- Has thanked: 26 times
- Been thanked: 23 times
Re: VWAP Oscillator (StDeV based)
Here is the code
Code: Select all
{***********************************************************************************************
Coded by dbntina/boxmeister 8/2/2007
Used the VWAP_H code provided by TS 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];
vars:
PriceW(0),
ShareW(0),
Count(0),
VolWAPValue(0),
VolWAPVariance(0),
VolWAPSD(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;
{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");
Re: VWAP Oscillator (StDeV based)
Code: Select all
vars:
PriceW(0),
ShareW(0),
Count(0),
VolWAPValue(0),
VolWAPVariance(0),
VolWAPSD(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;
{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(Close of data1 - VolWAPValue, "Diff VWAP");
Plot2(VolWAPSD, "VWAP1SDUp");
Plot3( -1* VolWAPSD, "VWAP1SDDown");
Plot4(2*VolWAPSD, "VWAP2SDUp");
Plot5(-2*VolWAPSD, "VWAP2SDDown");
Plot6(0, "zeroline");
{Plot2(VolWAPValue + VolWAPSD, "VWAP1SDUp");
Plot3(VolWAPValue - VolWAPSD, "VWAP1SDDown");
Plot4(VolWAPValue + (2*VolWAPSD), "VWAP2SDUp");
Plot5(VolWAPValue - (2*VolWAPSD), "VWAP2SDDown");}
The IRT version looks like the SD bands are normalized which some how I don't think a VWAP Standard deviation will be a straight line all day.
- Attachments
-
- VWAP_OSC.png
- (48.55 KiB) Downloaded 5419 times