NexusFi: Find Your Edge


Home Menu

 





Cumulative Sum not working for market internals


Discussion in ThinkOrSwim

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




 
Search this Thread

Cumulative Sum not working for market internals

  #1 (permalink)
 jngrim 
new york, ny/usa
 
Experience: Beginner
Platform: nt
Trading: futures
Posts: 128 since May 2012
Thanks Given: 32
Thanks Received: 50

I hop someone can help me. I would like to have an internal breadth indicator that does not reset each day but rather adds recent intraday period to to the previous day. Basically i want to do a cumulative sum of $addc or $voldc. For some reason I cannot get it work correct and it does not add correctly to the previous day...Here is my code. If anyone can help that would be great!

input exchange = {default NYSE, NASDAQ, AMEX};

def breadth;
switch (exchange) {
case NYSE:
breadth = close("$voldc");
case NASDAQ:
breadth = close("$UVOL/Q") - close("$DVOL/Q");
case AMEX:
breadth = close("$UVOA") - close("$DVOA");
}
def pcl = close("$voldc", AggregationPeriod.DAY);
def dailysum = TotalSum(pcl);

plot bread=dailysum[1]+breadth;

Started this thread Reply With Quote




Last Updated on August 10, 2017


© 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