StockFetcher Forums · General Discussion · Non-Zero Minimum Low<< >>Post Follow-up
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:

Fetcher[
apply to symlist(MQ)
set{minlo, low 253 day low}
draw minlo
add column minlo
]



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.

    Fetcher[

    apply to symlist(MQ,coin)
    set{min50, low 50 day low}
    set{min100, low 100 day low}
    set{min150, low 150 day low}

    set{low1,min(min50,min100)}
    set{low2,min(low1,min150)}

    set{high1,max(min50,min100)}
    set{high2,max(high1,min150)}

    set{sum1,min50 + min100}
    set{sum2,sum1 + min150}
    set{sum3,sum2 - low2}
    set{sum4,sum3 - high2}

    add column min150 {Fist smallest value}
    add column sum4 {Second smallest value}
    ]



  • 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.

    Fetcher[
    apply to symlist(MQ,coin, RBLX)

    set{CntDaysPriceIs0, count(low equal 0,1)}
    draw CntDaysPriceIs0
    set{DaysAfter0, days(CntDaysPriceIs0 equals 1, 252)}
    add column DaysAfter0
    set{MinLowOverDays, low DaysAfter0 day low}
    add column MinLowOverDays
    ]



    I am trying to get the min low for stocks that IPO'd over the past year.

    Thanks,
    Jason

    StockFetcher Forums · General Discussion · Non-Zero Minimum Low<< >>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.