StockFetcher Forums · General Discussion · How to declare a value as constant?<< >>Post Follow-up
ipaid
12 posts
msg #100892
Ignore ipaid
5/25/2011 8:22:36 AM

Hi all

is it somehow possible to declare a value as constant? For example i need to set the record 8 week high as constant for comparison with other values in the past.

According to the user guide i can declare a variable as follows:

set {RES,high 8 week high}

But RES is still a variable that changes it's value over time...

Any help is appreciated.

Thanks ipaid

Kevin_in_GA
4,552 posts
msg #100893
Ignore Kevin_in_GA
5/25/2011 8:46:58 AM

Hi all

is it somehow possible to declare a value as constant? For example i need to set the record 8 week high as constant for comparison with other values in the past.

According to the user guide i can declare a variable as follows:

set {RES,high 8 week high}

But RES is still a variable that changes it's value over time...

Any help is appreciated.

Thanks ipaid

++++++++

Yes, but that's what it is supposed to do, right? If you are interested in comparing values to the recent 8 week high, then a month or two from now you'll need to keep changing the filter. This syntax update automatically.

If you want it to hold a value over time, that is not really easily done in SF for a large number of stocks. You can set it individually for a stock by manually setting the value, but not for each stock returned from a filter.

ipaid
12 posts
msg #100895
Ignore ipaid
5/25/2011 10:04:12 AM

First of all thanks for your answer!

I think of the following problem:
I want to find stocks that traded in a constant range over time (horizontal channel). So i need to have a constant value to compare with.
I could use an absolute value to compare with but this would only be correct for a couple of stocks in that particular range.
So my idea was to use a dynamic calculated value for each stock but then keep this value constant over time.

For example:
Find all stocks that traded between today's close +/- 2% over the last 3 months

duke56468
683 posts
msg #100900
Ignore duke56468
5/25/2011 2:38:26 PM

Fetcher[
set{channeltop,high 60 day high}
set{channelbottom,low 60 day low}
set{tchg, channeltop minus channeltop 60 days ago }
set{bchg, channelbottom minus channelbottom 60 days ago}
set{atchg, abs(tchg)}
set{abchg, abs(bchg)}
set{channeltopchange, atchg / channeltop}
set{channelbottomchange, atchg / channeltop}
show stocks where close above 5
and draw channeltop on plot price
and draw channelbottom on plot price
and channeltop < 5 percent above channelbottom
and channeltopchange < 0.005
and channelbottomchange < 0.005
]


not sure if this is what you need from
http://help.stockfetcher.com/sfhelp/?id=100320&isiframe=&isiframe=

StockFetcher Forums · General Discussion · How to declare a value as constant?<< >>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 2016 - 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