| sunspore 22 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.
 
 
 |