NexusFi: Find Your Edge


Home Menu

 





Need Help with Volume/Price Average


Discussion in ThinkOrSwim

Updated
    1. trending_up 1,395 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread

Need Help with Volume/Price Average

  #1 (permalink)
VECTrader
Baltimore MD
 
Posts: 1 since Feb 2015
Thanks Given: 1
Thanks Received: 0

New to ToS but familiar with coding. I'm trying to create this:

VPA = close[0]*(volume[0]/volume[X]) + close[...n]*(volume[...n]/volume[X])

where X equals a range (5 bars or 15 bars or what ever range I want) and n equals the indexing of that range so n is 1 to 5, or 1 to 15, or whatever range I want. X and n should reflect the same range window, so if X is 5 then n is 1 to 5, or if X is 10 then n is 1 to 10.

I can do it manually but I was hoping someone could show how to make this input driven.

The challenge is to get close[0], close[1], ... close[n]; i have know idea how to make that happen.

#####
def vol = sum(volume , 5);

def day1 = close*(volume/vol);
def day2 = close[1] * (volume[1]/vol);
def day3 = close[2] * (volume[2]/vol);
def day4 = close[3] * (volume[3]/vol);
def day5 = close[4] * (volume[4]/vol);

plot VPA = day1+day2+day3+day4+day5;

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Increase in trading performance by 75%
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
18 thanks
GFIs1 1 DAX trade per day journal
16 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
  #2 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090

this Market Facilitation Index has what you want
Share-[AUTOLINK]TOS[/AUTOLINK]: MktFacillationIdx_R1V1

Reply With Quote
Thanked by:




Last Updated on February 10, 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