how do i set up a scanner for tight sideways consolidation?

Discussion in 'Technical Analysis' started by mute9003, Jun 24, 2025 at 11:12 AM.

  1. mute9003

    mute9003

    im struggling to figure out how to do this( my scanner game is weak i admit)

    im learning how to actually set up scanner for different strategies for learning purposes to figure out how to use advanced scanners like TOS and benzinga pro.
    so im running through different strategies that i found from people on youtube or forums etc. just for practice.

    but i cant seem to figure out one or two.

    one is setting up tight (flatline) sideways consolidation that persists for minimum number of days. (i dont see minimum number of days option in any scanner)
    and also
    trying to understand the tick count adn number of trades and if that is even possible to set up in those scanners.
    I tried using AI to generate code for TOS to create number of trades but none of the scripts seem to work. (maybe im not setting it up properly in TOS i dont know yet)
    still learning.
     
  2. Narrow range, NR7-like scans. Vol-bands inside n-sigma.
     
    cesfx and mute9003 like this.
  3. Sekiyo

    Sekiyo

    You can try dividing a fast range with a slow range.
    If 21 days range is x and 5 days range is y then
    y / x = 5D range in terms of 21D range.

    Range is max(source, length) - min(source, length).
    Source is either close, high or low.

    You can look for inside candles.
     
  4. deaddog

    deaddog

    (Max high for X number of days) > ((min low for x numbet of day )* x%)
     
  5. mute9003

    mute9003

    is there a different name for number of days? i dont see it in either scanner
     
  6. Sekiyo

    Sekiyo

    Lookback ? Length ? Period ? Usually it's defined within the built-in function as a parameter.

    If you take an sma (moving average) function they'll likely ask for 2 inputs: a source and a length.

    source = close; length = 21
    close21_sma = sma(source, length)
     
    Last edited: Jun 24, 2025 at 12:37 PM

  7. Hi mute,

    I’ve coded a lot of scans in TOS but not one like that. Ideas that might be tested could be to:

    - specify that the ADX trend indicator has to have been below a certain level for the last N price bars, suggesting that strongly non-trending conditions exist

    or

    - require that the difference between the highest high and lowest low of the last N price bars must be below some experimentally determined level, indicating that there has been little up-and-down price movement… or using the highest close minus the lowest close of the last N price bars instead (it might help to normalize their values to the current ATR to make results independent of price levels and therefore more useful in different markets)
     
    HawaiianIceberg and mute9003 like this.
  8. mute9003

    mute9003



    how do you feel about ai generated scripts? ive been using grok to help me generate those scripts and the number of trades scripts seem to check out but never show any output when i try to use them. maybe im not using correct settings i donno
     
  9. Sekiyo

    Sekiyo

    Try deepseek. For me it's been better than grok or GPT (script wise). Maybe you don't explain / describe well enough what you want. But ultimately it's always a plus to be able to read / write code. TOS language isn't that difficult. Read the documentation.

    As usual... AI is more like an intern than a veteran.
     
    Last edited: Jun 25, 2025 at 11:33 AM
  10. Historically, AI-generated trading indicator scripts have been terrible/unusable, but they seem to be getting better.

    The site that Schizo mentioned in one of your threads last year, https://usethinkscript.com/, might be a good place to discuss your question about scans.
     
    HawaiianIceberg likes this.