StockFetcher Forums · General Discussion · confounding??<< >>Post Follow-up
sunspore
18 posts
msg #149834
Ignore sunspore
12/8/2019 3:17:24 PM

I have created a filter that returns incorrect values for 2 of the user-created variables, but then somehow returns the correct final number, which uses the 2 erroneous values in the calculation. The only thing I can figure is that the program has the correct number on the back end, but is displaying an incorrect value on the graphic. The code:

Show stocks where market is not etf
and market is not otc
and the average volume(50) > 250000

and the close is between 5 and 20
and beta is above 1

set{nearest,roc(20)}
set{r1,nearest*10}
set{mid,roc(90)}
set{r2,mid*1.5}
set{r3,roc(125)}
set{r4,roc(250)}
set{ind1,r1+r2}
set{ind2,ind1+r3}
set{ind3,ind2+r4}
set{roc_index,ind3/4}
add column roc_index
add column nearest
add column r1
add column r2
add column r3
add column r4

and roc(90) > 0

and market cap is > 200
and market cap is below 10000

Notice that the output for columns r1 and r2 are incorrect. Yet the roc_index column is correct, which would be impossible if it used the r1 and r2 values it displays in the roc_index formula.

I made a replica of this script that does display the correct r1 and r2 values, the only difference being that i used 3-character names for the variables. But this wouldn't explain why the r2 and r3 columns were correct, or why the roc_index output was correct.

compound_gains
222 posts
msg #149835
Ignore compound_gains
12/8/2019 5:11:36 PM

I believe you'll find that r1 and r2 in an add column are interpreted as pivot point resistance-1 and resistance-2. Same would happen if you used s1 and s2. Use something other than r1 and r2.

Fetcher[
not etf
not otc
average volume(50) > 250000

close between 5 and 20
beta above 1

set{nearest,roc(20)}
set{x1,nearest*10}
set{mid,roc(90)}
set{x2,mid*1.5}
set{x3,roc(125)}
set{x4,roc(250)}
set{ind1,x1+x2}
set{ind2,ind1+x3}
set{ind3,ind2+x4}
set{roc_index,ind3/4}
add column roc_index
add column nearest
add column x1
add column x2
add column x3
add column x4

roc(90) > 0

market cap above 200
market cap below 10000
]



sunspore
18 posts
msg #149836
Ignore sunspore
12/8/2019 5:17:14 PM

Thank you, that makes a lot of sense.

StockFetcher Forums · General Discussion · confounding??<< >>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.