Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
TS/MC: VWAP with standard deviation indicator.
Updated July 7, 2017
Top Posters
looks_one
Big Mike
with 2 posts (5 thanks)
looks_two
pmat
with 2 posts (0 thanks)
looks_3
Quick Summary
with 1 posts (0 thanks)
looks_4
Insearch
with 1 posts (0 thanks)
trending_up
14,715 views
thumb_up
5 thanks given
group
7 followers
forum
9 posts
attach_file
0 attachments
TS/MC: VWAP with standard deviation indicator.
July 16th, 2010, 01:13 PM
Canada
Experience: Advanced
Platform: Sierra Chart
Trading: ES,6E
Posts: 25 since Jun 2010
Thanks Given: 1
Thanks Received: 30
Hello ...
I am looking for a TS/MultiCharts VWAP indicator with standard deviation bands as shown in this MarketDelta video.
Created by Camtasia Studio 6
Thanks in advance incase you can find/code that for me.
- Marco.
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
July 16th, 2010, 02:10 PM
East Windsor, NJ
Posts: 5 since Jul 2010
Thanks Given: 1
Thanks Received: 0
Not sure about TS/MC, but can you code a little. I know there's a nice VWAP indicator on the NT support forum, which you might be able to glean code from?
August 17th, 2010, 08:12 PM
Manta, Ecuador
Site Administrator Developer Swing Trader
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,536
Here is EasyLanguage VWAP Hourly with standard deviation :
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" );
Mike
October 8th, 2010, 04:59 PM
Cebu, Philippines
Experience: Advanced
Platform: NinjaTrader
Trading: Emini ES
Posts: 71 since Oct 2009
Thanks Given: 128
Thanks Received: 118
Has anyone converted this to NT7?
May 20th, 2011, 12:51 PM
Paris
Experience: Beginner
Platform: MultiCharts, Visual Charts
Trading: Index Futures, Stocks
Posts: 15 since Apr 2011
Thanks Given: 35
Thanks Received: 9
Hello everybody,
obviously some parts of the code where converted into smileys here :
if mod( (TimeToMinutes(time)-TimeToMinutes(iStartTime) , TimeToMinutes(ResetMinutes) = 0 then
could you tell me what is missing ?
Thank you very much in advance.
May 20th, 2011, 06:28 PM
Manta, Ecuador
Site Administrator Developer Swing Trader
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,536
pmat
Hello everybody,
obviously some parts of the code where converted into smileys here :
if mod( (TimeToMinutes(time)-TimeToMinutes(iStartTime) , TimeToMinutes(ResetMinutes) = 0 then
could you tell me what is missing ?
Thank you very much in advance.
It isn't supposed to do that, sorry.
if mod( (TimeToMinutes(time)-TimeToMinutes(iStartTime) ), TimeToMinutes(ResetMinutes) ) = 0 then
begin
PriceW = 0;
ShareW = 0;
Count = -1;
Value1 = 0;
Value2 = 0;
VolWAPValue = 0;
end;
Mike
May 22nd, 2011, 05:41 PM
Paris
Experience: Beginner
Platform: MultiCharts, Visual Charts
Trading: Index Futures, Stocks
Posts: 15 since Apr 2011
Thanks Given: 35
Thanks Received: 9
thank you Big Mike, it's working.
Have a nice day.
November 2nd, 2014, 01:29 PM
Prag, Czech Republic
Experience: Intermediate
Platform: Jforex, TradeStation
Broker: TradeStation
Trading: Futures, Forex
Posts: 1 since Jun 2013
Thanks Given: 1
Thanks Received: 0
Hi everybody,
I made some variant of this indicator. It calculate values from start of day and shows only VWAP standard deviation.
During developing I found some problems:
1) Indicator starts not only one time but more times. The less is timeframe the more will be starts
2) Indicator shows values from second day (from history) (it’s OK) but not from 00:00 but later
I attach ELD files and a part of log for 30 minutes chart.
Can anybody help me? Thanks in advance.
*******************************************************************************************************************************
vars:
string OInfo( "" ),
bool ShowInfo( False ),
bool IsStart( True ),
BarPrice(0),
BarVolume(0),
BPBV(0),
SumBPPV(0),
SumBV(0),
Count(0),
VWAPrice(0),
Index(0),
SumVRNC(0),
VWAPSD(0);
ShowInfo = True;
If IsStart = True Then
Begin
IsStart = False;
If ShowInfo = True Then Print ( "IsStart!" );
End;
//if CurrentSession( 1 ) <> CurrentSession( 1 )[ 1 ] Then
if Date > Date[ 1 ] Then
Begin
SumBPPV = 0;
SumBV = 0;
Count = 0;
End;
// BarPrice = Close;
BarPrice = AvgPrice;
BarVolume = UpTicks + DownTicks;
BPBV = BarPrice * BarVolume;
SumBPPV = SumBPPV + BPBV;
SumBV = SumBV + BarVolume;
Count = Count + 1;
If SumBV > 0 Then
Begin
VWAPrice = SumBPPV / SumBV;
End;
SumVRNC = 0;
For Index = 0 To Count - 1
Begin
BarPrice = AvgPrice[ Index ];
BarVolume = UpTicks[ Index ] + DownTicks[ Index ];
SumVRNC = SumVRNC + ( BarVolume / SumBV ) * Square( BarPrice - VWAPrice );
End;
VWAPSD = Squareroot( SumVRNC );
Plot1( VWAPSD, "VWAPStDev_D" );
If ShowInfo = True Then
Begin
OInfo = "";
OInfo = OInfo + "DTm: " + AA_getSDateTime( Bardatetime[ 0 ].ELDateTimeEx ) + "; ";
OInfo = OInfo + "D: " + NumToStr( Date + 19000000, 0 ) + "; ";
OInfo = OInfo + "D1: " + NumToStr( Date[ 1 ] + 19000000, 0 ) + "; ";
OInfo = OInfo + "Count: " + NumToStr( Count, 0 ) + "; ";
// OInfo = OInfo + "BPrice: " + NumToStr( BarPrice, 3 ) + "; ";
OInfo = OInfo + "VWAPSD: " + NumToStr( VWAPSD, 3 ) + "; ";
OInfo = OInfo + "CSss: " + NumToStr( CurrentSession( 1 ), 0 ) + "; ";
Print( OInfo );
End;
*******************************************************************************************************************************
Inputs:
DateTime( NumericSimple );
Vars:
YearsN(0),
MonthsN(0),
DaysN(0),
HoursN(0),
MinutesN(0),
SecondsN(0),
string YearsS( "" ),
string MonthsS( "" ),
string DaysS( "" ),
string HoursS( "" ),
string MinutesS( "" ),
string SecondsS( "" );
YearsN = Yearfromdatetime( DateTime);
MonthsN = Monthfromdatetime( DateTime );
DaysN = Dayfromdatetime( DateTime );
HoursN = Hoursfromdatetime( DateTime );
MinutesN = Minutesfromdatetime( DateTime );
SecondsN = Secondsfromdatetime( DateTime );
YearsS = NumToStr( YearsN, 0 );
MonthsS = NumToStr( MonthsN, 0 );
DaysS = NumToStr( DaysN, 0 );
HoursS = NumToStr( HoursN, 0 );
MinutesS = NumToStr( MinutesN, 0 );
SecondsS = NumToStr( SecondsN, 0 );
If MonthsN <= 9 Then MonthsS = "0" + MonthsS;
If DaysN <= 9 Then DaysS = "0" + DaysS;
If HoursN <= 9 Then HoursS = "0" + HoursS;
If MinutesN <= 9 Then MinutesS = "0" + MinutesS;
If SecondsN <= 9 Then SecondsS = "0" + SecondsS;
AA_getSDateTime = "?";
AA_getSDateTime = YearsS + "." + MonthsS + "." + DaysS + " " + HoursS + ":" + MinutesS + ":" + SecondsS;
*******************************************************************************************************************************
IsStart!
DTm: 2014.10.26 18:00:00; D: 20141026; D1: 20141026; Count: 1; VWAPSD: 0.000; CSss: 1;
DTm: 2014.10.26 18:30:00; D: 20141026; D1: 20141026; Count: 2; VWAPSD: 0.345; CSss: 1;
DTm: 2014.10.26 19:00:00; D: 20141026; D1: 20141026; Count: 3; VWAPSD: 0.604; CSss: 1;
IsStart!
DTm: 2014.10.26 19:00:00; D: 20141026; D1: 20141026; Count: 1; VWAPSD: 0.000; CSss: 1;
DTm: 2014.10.26 19:30:00; D: 20141026; D1: 20141026; Count: 2; VWAPSD: 0.093; CSss: 1;
DTm: 2014.10.26 20:00:00; D: 20141026; D1: 20141026; Count: 3; VWAPSD: 0.319; CSss: 1;
DTm: 2014.10.26 20:30:00; D: 20141026; D1: 20141026; Count: 4; VWAPSD: 0.736; CSss: 1;
DTm: 2014.10.26 21:00:00; D: 20141026; D1: 20141026; Count: 5; VWAPSD: 1.211; CSss: 1;
IsStart!
DTm: 2014.10.26 20:00:00; D: 20141026; D1: 20141026; Count: 1; VWAPSD: 0.000; CSss: 1;
DTm: 2014.10.26 20:30:00; D: 20141026; D1: 20141026; Count: 2; VWAPSD: 0.448; CSss: 1;
DTm: 2014.10.26 21:00:00; D: 20141026; D1: 20141026; Count: 3; VWAPSD: 0.794; CSss: 1;
DTm: 2014.10.26 21:30:00; D: 20141026; D1: 20141026; Count: 4; VWAPSD: 0.847; CSss: 1;
DTm: 2014.10.26 22:00:00; D: 20141026; D1: 20141026; Count: 5; VWAPSD: 0.946; CSss: 1;
DTm: 2014.10.26 22:30:00; D: 20141026; D1: 20141026; Count: 6; VWAPSD: 0.961; CSss: 1;
DTm: 2014.10.26 23:00:00; D: 20141026; D1: 20141026; Count: 7; VWAPSD: 0.712; CSss: 1;
IsStart!
DTm: 2014.10.26 21:00:00; D: 20141026; D1: 20141026; Count: 1; VWAPSD: 0.000; CSss: 1;
DTm: 2014.10.26 21:30:00; D: 20141026; D1: 20141026; Count: 2; VWAPSD: 0.203; CSss: 1;
DTm: 2014.10.26 22:00:00; D: 20141026; D1: 20141026; Count: 3; VWAPSD: 0.388; CSss: 1;
DTm: 2014.10.26 22:30:00; D: 20141026; D1: 20141026; Count: 4; VWAPSD: 0.412; CSss: 1;
DTm: 2014.10.26 23:00:00; D: 20141026; D1: 20141026; Count: 5; VWAPSD: 0.392; CSss: 1;
DTm: 2014.10.26 23:30:00; D: 20141026; D1: 20141026; Count: 6; VWAPSD: 0.630; CSss: 1;
DTm: 2014.10.27 00:00:00; D: 20141027; D1: 20141026; Count: 1; VWAPSD: 0.000; CSss: 1;
DTm: 2014.10.27 00:30:00; D: 20141027; D1: 20141027; Count: 2; VWAPSD: 0.156; CSss: 1;
DTm: 2014.10.27 01:00:00; D: 20141027; D1: 20141027; Count: 3; VWAPSD: 0.120; CSss: 1;
......
*******************************************************************************************************************************
July 7th, 2017, 10:02 AM
Perth AUSTRALIA
Posts: 253 since Jun 2017
Thanks Given: 79
Thanks Received: 87
thank you Big Mike, this works well on Tradestation 9.5
Last Updated on July 7, 2017