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 NickA 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 NickA with 0.5 thanks per post
    4. looks_4 Big Mike with 0.5 thanks per post
    1. trending_up 31,286 views
    2. thumb_up 15 thanks given
    3. group 11 followers
    1. forum 27 posts
    2. attach_file 0 attachments




 
Search this Thread

TWAP and VWAP

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


mavinwiz View Post
Does anyone have TWAP for Ninjatrader?

Thanks in advance and cheers!

Download it here:


Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
20 thanks
Just another trading journal: PA, Wyckoff & Trends
14 thanks
Coding money management strategies.
14 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
9 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,439 since Jun 2009
Thanks Given: 33,201
Thanks Received: 101,598


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

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 - Downloads - Top
no new posts