Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Add total of indicator values for the last 'X' number of days Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
scvenne
Posted : Monday, February 4, 2013 1:41:28 PM
Registered User
Joined: 5/13/2007
Posts: 48

Good day, I am trying to figure out how to add the running total of an indicator for the last 'x' number of days. If I take an indicator such as Elder Force Index and plot it on a daily chart it returns the value for each day. But I would like to add the running total of the last 'x' number of days and plot it. Not an average of the last 'x' days, but a cumulative running total that only looks at the values for the last 'x' days and adds them up. Any ideas?

Thanks, Steve

Bruce_L
Posted : Monday, February 4, 2013 1:48:42 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The simple moving average is just the sum of whatever is being averaged over those days divided by the period. So if you have the simple moving average, you can multiply it by the period to get the sum.

'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Sum of Elder Force Index
'|******************************************************************
'# Period = UserInput.Integer = 10
'# EFI = indicator.Library.Elder Force Index
Plot = Period * EFI.AVG(Period)


-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.