Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Add the Spreadsheet Formula study.
- Put this formula in its Formula field: =ABS(O-C)
- Check 'Hide Study' (optional).
Add the Moving Average - Simple study.
- Set the 'Based On'' to the Spreadsheet Formula study.
- Set the 'Chart Region' to the same as the Spreadsheet Formula study.
- Set the 'Input Data' to Result
- Set the 'Length' to your requirements.
Thanks that does work, but is it normal for spreadsheet formula indicator to only calculate to N bars back (2000 is the default).
Other build in indicators just seem to calculate as needed and you can scroll back days or weeks and they work fine, but the spreadsheet formula based one stops after 2000 bars back (for example).
It is a limitation in other studies that contain user formulas:
-Color Bar Based On Alert Condition
-Color Background Based On Alert Condition
-Trading System Based On Alert Condition
-All 3 spreadsheet studies
If you want to see further back, you can scroll the chart into the past, do a Replay Chart, and hit Pause.
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,041 since Dec 2013
Thanks Given: 4,375
Thanks Received: 10,192
Your over complicating it.
If todays close is C and yesterdays close was C[1] then todays change is C-C[1]
It follows that the "average price change over the last 3 days" is
( (C - C[1]) + (C[1]-C[2]) + (C[2]-C[3]) ) / 3
which is just simply
(C- C[3])/3
Hence the "average price change over the last N days" is just (C-C[N])/N