StockFetcher Forums · General Discussion · var in 'days ago'<< >>Post Follow-up
garryp
39 posts
msg #39295
Ignore garryp
12/3/2005 12:13:48 PM

Is there any way I can use a set var in 'days ago' (and potentially other) phrases?

set{X,low 10 day low 10 days ago}
works as expected

set{Y,10}
and set{X,low 10 day low Y days ago}
fails.

Is there a way accomplish the second (failed) result, i.e. use of a set var in 'days ago'?


manabu
7 posts
msg #39323
Ignore manabu
12/4/2005 6:26:11 AM

Here is one way that would be the same as
set{Y,15}
set{pastclose, close Y days ago}

Unfortunately it requires several lines and it is not as flexible. But it works.
And maybe it will give you some idea of another way. Best I can do today.

Try this,


/*Select by setting ONE and only one of the daysago values to 1 */
/*All 3 others must be set to 0 */

set{daysago5, 0}
set{daysago10, 0}
set{daysago15, 1}
set{daysago20, 0}

set{close5, close 5 days ago * daysago5}
set{close10, close 10 days ago * daysago10}
set{close15, close 15 days ago * daysago15}
set{close20, close 20 days ago * daysago20}

set{temp1, close5 + close10}
set{temp2, temp1 + close15}
set{temp3, temp2 + close20}

set{pastclose, temp3}
add column pastclose




StockFetcher Forums · General Discussion · var in 'days ago'<< >>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.