New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.
Options

Bad Scan Results

2»

Comments

  • Options
    Same answer as before. Test MACD for bearish, if that's not true (in other words, MACD is bullish), you'll get results for the "or" conditions if any are true.

    Of course, the easiest way is to run a separate scan for MACD is bullish for SPX. If you don't get a result, don't run the other scan(s).
  • Options
    Yes, thanks. I think that I'll just run both scans.
  • Options
    A buyable gap up should be at least .75 times a stocks 40 day ATR. I think that this one is easy to code but I'm having a little trouble today? [Close > ATR(40,Close)*1.75] I assume that the scan default time period for ATR is 14? Anyway, how does that look?
  • Options
    As I try to work on this one the scan auto response says "wrong parameter count for atr, requires 1" and I don't know what it's telling me?
  • Options
    ATR(x) only takes one parameter, which has to be a number. So adding "close" kicks out an error.

    I think you want

    and [ open - 1 day ago close > 1 day ago ATR(14) * 1.75]
  • Options
    Yes, I think I see it now. I think that your right about what I want.
  • Options
    On second though, I think that is not correct either, I am looking for a gain in price that is at least 1.75 times greater than the 40 day average of its ATR
  • Options
    [ open - 1 day ago close > ATR(40,Close)*1.75]
  • Options
    The simple moving average function is sma(x, y). X is the length of the average, y is whatever you want to average, usually the close, but it can be anything, like an indicator.
Sign In or Register to comment.