StockFetcher Forums · Filter Exchange · How to calculate lowest and highest value of a custom indicator over x days<< >>Post Follow-up
guru_trader
485 posts
msg #59557
Ignore guru_trader
2/9/2008 8:29:46 PM

I know how to find the lowest low and highest high over the last x days, but how can I calculate the lowest value and highest value of a custom indicator over the last x days?

For example, if this is my custom indicator ... set{custom_indicator, close - close 5 days ago} ... I want to know the lowest value and highest value of the custom_indicator over the last 100 days.

nikoschopen
2,824 posts
msg #59560
Ignore nikoschopen
2/9/2008 9:59:46 PM

Guru, try the following filter. I also took the liberty of applying the 3-day moving average of the "custom indicator" to the 3 day moving average of the close, which I found interesting.

Fetcher[
set{custom_indicator, close - close 5 days ago}
set{hi52ci, custom_indicator 52 week high}
set{lo52ci, custom_indicator 52 week low}

add column hi52ci
add column lo52ci

draw custom_indicator line at custom_indicator 52 week low
draw custom_indicator line at custom_indicator 52 week high

/*Adding 3-Period MA of "custom_indicator" on Price Plot*/

set{diff, close + custom_indicator}
draw cma(diff,7) on plot close
draw ma(7)
do not draw diff
]



guru_trader
485 posts
msg #59570
Ignore guru_trader
2/10/2008 12:17:16 AM

Oh, that's right, Thanks, Niko ... I haven't used the highest/lowest function in a while.

Wow, you're right, you're on to something interesting ... I'll continue working with the filter you provided.

StockFetcher Forums · Filter Exchange · How to calculate lowest and highest value of a custom indicator over x days<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.