NexusFi: Find Your Edge


Home Menu

 





TWAP and VWAP


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one bomberone1 with 9 posts (0 thanks)
    2. looks_two Fat Tails with 5 posts (12 thanks)
    3. looks_3 courier12 with 3 posts (0 thanks)
    4. looks_4 Big Mike with 2 posts (1 thanks)
      Best Posters
    1. looks_one Fat Tails with 2.4 thanks per post
    2. looks_two treydog999 with 1 thanks per post
    3. looks_3 Big Mike with 0.5 thanks per post
    4. looks_4 NickA with 0.5 thanks per post
    1. trending_up 32,645 views
    2. thumb_up 15 thanks given
    3. group 11 followers
    1. forum 27 posts
    2. attach_file 0 attachments




 
Search this Thread
  #21 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,889 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,107


mavinwiz View Post
Does anyone have TWAP for Ninjatrader?

Thanks in advance and cheers!

Download it here:

https://nexusfi.com/download/ninjatrader-7/indicators/934-download.html?view

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
DOM in QTrader vs Bookmap
Platforms and Indicators
TOS inspired trading simulator
ThinkOrSwim
Time, Futures, Scalping, Treasurys
Treasury Notes and Bonds
How to: Multi Time-Frame Volume Profile?
NinjaTrader
convert to nt8
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Vinny E-Mini & Algobox Review TRADE ROOM
8 thanks
Futures spread trading grains education sources?
6 thanks
Just another trading journal: PA, Wyckoff & Trends
4 thanks
Wheres the videos?
3 thanks
Blue wave trading review
2 thanks
  #22 (permalink)
 ciardim 
it
 
Experience: Advanced
Platform: mc
Posts: 32 since Jun 2010
Thanks Given: 59
Thanks Received: 3

gm to everyone. i try vwap indicator for multicharts. daily weekly and mountly. i am elite member, is available? i dont try

Reply With Quote
  #23 (permalink)
 MilesT 
Orlando, FL
 
Experience: Intermediate
Platform: OEC
Broker: VanKar/OEC
Trading: 6E
Posts: 11 since Dec 2011
Thanks Given: 44
Thanks Received: 11


Can someone help me modify the following EL code to make the start time for this VWAP indicator an input instead of hard coded? Thanks in advance!

vars: vwap(0),
pv(0),
Totalvolume(0),
Barfromstart(0),
Squareddeviations(0),
Probabilityweighteddeviations(0),
deviationsum(0),
standarddeviation(0),
OncePerDay(0);
If date > date[1] then OncePerDay = 0 ;
If Time >= 200 and OncePerDay = 0 then begin
OncePerDay = 1 ;
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);

Reply With Quote
  #24 (permalink)
 
treydog999's Avatar
 treydog999 
seoul, Korea
 
Experience: Intermediate
Platform: Multicharts
Broker: CQG, DTN IQfeed
Trading: YM 6E
Posts: 897 since Jul 2012
Thanks Given: 291
Thanks Received: 1,039


MilesT View Post
Can someone help me modify the following EL code to make the start time for this VWAP indicator an input instead of hard coded? Thanks in advance!

vars: vwap(0),
pv(0),
Totalvolume(0),
Barfromstart(0),
Squareddeviations(0),
Probabilityweighteddeviations(0),
deviationsum(0),
standarddeviation(0),
OncePerDay(0);
If date > date[1] then OncePerDay = 0 ;
If Time >= 200 and OncePerDay = 0 then begin
OncePerDay = 1 ;
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);

Now you can change the time variable TimeReset;
 
Code
input:TimeReset(1515);
vars: vwap(0),
pv(0),
Totalvolume(0),
Barfromstart(0),
Squareddeviations(0),
Probabilityweighteddeviations(0),
deviationsum(0),
standarddeviation(0),
OncePerDay(0);
If date > date[1] then OncePerDay = 0 ;
If Time >= TimeReset and OncePerDay = 0 then begin
OncePerDay = 1 ;
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);

Reply With Quote
Thanked by:
  #25 (permalink)
 courier12 
Mumbai India
 
Experience: None
Platform: TradeStation
Trading: Forex
Posts: 39 since Nov 2014
Thanks Given: 58
Thanks Received: 10

Hi @Fat Tails or anyone:

Has anyone coded the TWAP indicator in ThinkorSwim? TOS has a built in VWAP but not TWAP.

Any help would be great!

Thank you,

Reply With Quote
  #26 (permalink)
 
Big Mike's Avatar
 Big Mike 
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,670 since Jun 2009
Thanks Given: 33,403
Thanks Received: 102,198


courier12 View Post
Hi @Fat Tails or anyone:

Has anyone coded the TWAP indicator in ThinkorSwim? TOS has a built in VWAP but not TWAP.

Any help would be great!

Thank you,

You are doing it wrong...

@Fat Tails programs in NinjaTrader, not ThinkOrSwim.

You are posting in an EasyLanguage thread, not ThinkOrSwim.

Best to create a new thread in the proper ThinkOrSwim sub-forum asking for someone to code a TWAP.

Mike



Join the free Markets Chat beta: Real-time Trading Insights

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #27 (permalink)
 courier12 
Mumbai India
 
Experience: None
Platform: TradeStation
Trading: Forex
Posts: 39 since Nov 2014
Thanks Given: 58
Thanks Received: 10


Big Mike View Post
You are doing it wrong...

@Fat Tails programs in NinjaTrader, not ThinkOrSwim.

You are posting in an EasyLanguage thread, not ThinkOrSwim.

Best to create a new thread in the proper ThinkOrSwim sub-forum asking for someone to code a TWAP.

Mike

Thank you @Big Mike. Just posted the question in the Thinkscript thread.

Reply With Quote
  #28 (permalink)
 courier12 
Mumbai India
 
Experience: None
Platform: TradeStation
Trading: Forex
Posts: 39 since Nov 2014
Thanks Given: 58
Thanks Received: 10

Hi:

does anyone have the Easy Language code for Yearly VWAP and SD bands for Tradestation?

Thank you,

Reply With Quote




Last Updated on May 7, 2015


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Sitemap - Downloads - Top
no new posts