CCI Divergence scan

I keep getting the message "The Scan Engine is taking too long to return your results. Please try again later." for this scan. [type = stock] and [country = canada] and [close > .50] and [close < 10.00] and [volume > 200000] and [close > 5 days ago close * 1.025] and [[[CCI(20) > 100.0) - 5 days ago CCI(20) > 100.0)] / AbsVal (5 days ago CCI(20) > 100.0))] < -0.08 ]

Any idea as to why?

Comments

  • markd
    markd mod
    edited August 2018
    These conditions are invalid:

    [CCI(20) > 100.0) - 5 days ago CCI(20) > 100];

    AbsVal (5 days ago CCI(20) > 100.0))] < -0.08

    You can have only one operator (the comparison operator in this case ">") between a pair of brackets "[ ]".

    Also, a comparison operator in a function (AbsVal) is not valid.

    If you want CCI(20) >100 you have to make that a separate condition. Same with 5 days ago CCI(20) > 100.

    So, I think you want this:

    // stocks of interest (the universe to choose from)
    [type = stock]
    and [country = canada]
    and [close > .50]
    and [close < 10.00]
    and [volume > 200000]

    //price condition
    and [close > 5 days ago close * 1.025]

    // indicator conditions
    and [CCI(20) > 100]
    and [5 days ago CCI(20) > 100]

    and [ [CCI(20) - 5 days ago CCI(20)] / [AbsVal (5 days ago CCI(20))] < -0.08 ]

    Pretty sophisticated scan. Nice work.