Trader_X 2 posts msg #147826 - Ignore Trader_X |
5/18/2019 12:02:20 AM
Hello -
I am new to StockFetcher, and trying to write a simpler filter that will show me all stocks whose volume today > average daily volume (over past 30 days or so) * 2. So all stocks that traded more than twice their average daily volume. I tried making a filter where I filtered for
volume > average volume (30) * 2
But that gave me over 3000 stocks. Then I tried
volume > (average volume (30) * 2)
which gave me 0 stocks.
Can anyone help?
Thanks.
|
SAFeTRADE 644 posts msg #147827 - Ignore SAFeTRADE |
5/18/2019 4:10:28 AM
|
Trader_X 2 posts msg #147851 - Ignore Trader_X |
5/20/2019 9:34:43 PM
Thanks!
|
Village Elder 231 posts msg #147854 - Ignore Village Elder |
5/21/2019 7:35:29 AM
When doing math in SF code, it is almost always better to do it within user-defined variables (the SET{} statement) rather than trying to integrate it into the filter selection. Also remember that you can only do one mathematical operation per set{} statement - a real limitation with SF code. Not sure why they can't improve on this.
|