jjmcguire 22 posts msg #158063 - Ignore jjmcguire |
11/20/2021 11:49:56 AM
Hello, how do I retrieve the non-zero minimum low over a time period if my look back period includes the days where the stock price was zero in stockfetcher? I also don't want to manually change the look back period to begin on or after the IPO date. I would like the minlo variable to show $19.78 instead of $0 in the example below:
Thanks,
Jason
|
Mactheriverrat 3,153 posts msg #158066 - Ignore Mactheriverrat modified |
11/20/2021 3:08:24 PM
add column low 12 week low
draw low 12 week low
Might be because MQ hasn't been trading for 253 days . Maybe the above code might help with other stocks .
draw low 253 day low
add column low 253 day low
|
jjmcguire 22 posts msg #158073 - Ignore jjmcguire |
11/21/2021 9:37:20 AM
Thanks Mac.
I am seeking a solution that allows me to scan up to 253 days, but only captures the minimum non-zero value. I have thought about searching 253, 120, 60, 30 days at the same time, and take the first non-zero value, but i am not sure how to do that.
|
xarlor 581 posts msg #158075 - Ignore xarlor modified |
11/21/2021 11:17:44 AM
This is not a bullet-proof solution. This finds the second smallest value of three values.
Here are the caveats:
IPO must be older than 50 days. If not, the second smallest will also be 0.
IPO must be younger than 150 days. If not, the first smallest is the true smallest, but you will get the second smallest anyway.
|
jjmcguire 22 posts msg #158336 - Ignore jjmcguire |
1/3/2022 10:07:26 PM
Thanks Xarlor. I appreciate you help.
I was hoping there was an easier and cleaner way to finding a non-zero min.
Jason
|
jjmcguire 22 posts msg #158342 - Ignore jjmcguire |
1/4/2022 5:41:15 PM
Does anyone know how to get this working? Substituting the number of Days in the MinLowOverDays set doesn't seem to be working.
I am trying to get the min low for stocks that IPO'd over the past year.
Thanks,
Jason
|