Break out Screener with High Volume to the Down Side

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #200986 quote
    Mary
    Participant
    Average

    Hello,  the Breakout screener with high volume below only shows stocks for the Upside Breakout.

    How can this Screener below be modified to do the same thing for the Downside please?  Breakout candle with high volume to the Down side?  Thank you.

    // today variation
    tdVar = (close[0] – open[0]) / open[0] * 100

    // Var condition
    avgVar = 0
    for i = 1 to 10 do
    if (close[i] > open[i]) then
    avgVar = avgVar + (close[i] – open[i]) / open[i]
    else
    avgVar = avgVar + (open[i] – close[i]) / close[i]
    endif
    next
    avgVar = avgVar / 10 * 100

    c1 = tdVar > avgVar

    // highest break condition
    maxValue = highest[10](high)[1]
    c2 = maxvalue < close and open < maxvalue

    // Volume condition
    avgVol = average[20](volume)
    sum = 0
    for i=0 to 20
    if (volume[i] < avgVol*10) then
    sum = sum + volume[i]
    else
    sum = sum + avgVol
    endif
    next

    avgVol = sum / 21
    c3 = avgVol > 1000

    // Breakout Var%
    breakoutVar = (close – maxvalue)/close*100

    // Screener
    SCREENER[c1 and c2 and c3](breakoutVar as “Breakout Var%”)

    #200988 quote
    robertogozzi
    Moderator
    Master

    Try this one (not tested):

    // today variation
    tdVar = (close[0] – open[0]) / open[0] * 100
    // Var condition
    avgVar = 0
    for i = 1 to 10 do
       if (close[i] > open[i]) then
          avgVar = avgVar + (close[i] – open[i]) / open[i]
       else
    
      avgVar = avgVar + (open[i] – close[i]) / close[i]
       endif
    
next
    avgVar = avgVar / 10 * 100
    c1 = tdVar > avgVar
    // lowest break condition
minValue = lowest[10](low)[1]
    c2 = minValue > close and open > minValue
    // Volume condition
    avgVol = average[20](volume)
    sum = 0
    for i=0 to 20
    
   if (volume[i] < avgVol*10) then
          sum = sum + volume[i]
       else
          sum = sum + avgVol
       endif
    next
    avgVol = sum / 21

    c3 = avgVol > 1000
    // Breakout Var%
    breakoutVar = abs(close – minValue)/close*100
    // Screener
    SCREENER[c1 and c2 and c3](breakoutVar as “Breakout Var%”)
    #200992 quote
    Mary
    Participant
    Average

    Thank you I put in the code but there is an error saying that

    minValue is not defined.

    Can this be corrected please?

    Thank you

    #200995 quote
    robertogozzi
    Moderator
    Master

    Sorry, it’s due to line 14 having mistakingly joined two lines.

    Replace it with these lines:

    // lowest break condition

    minValue = lowest[10](low)[1]
    #201061 quote
    Mary
    Participant
    Average

    Hi Robert,

    I fixed it as you suggested but now the code is not showing error but returning nothing at all not on nasdaq, not on nyc not, not on any georaphic zone.

    this is the code I have fixed as you suggested:

    // today variation
    tdVar = (close[0] – open[0]) / open[0] * 100
    // Var condition
    avgVar = 0
    for i = 1 to 10 do
    if (close[i] > open[i]) then
    avgVar = avgVar + (close[i] – open[i]) / open[i]
    else
    avgVar = avgVar + (open[i] – close[i]) / close[i]
    endif
    next
    avgVar = avgVar / 10 * 100
    c1 = tdVar > avgVar
    // lowest break condition
    minValue = lowest[10](low)[1]
    c2 = minValue > close and open > minValue
    // Volume condition
    avgVol = average[20](volume)
    sum = 0
    for i=0 to 20
    if (volume[i] < avgVol*10) then
    sum = sum + volume[i]
    else
    sum = sum + avgVol
    endif
    next
    avgVol = sum / 21
    c3 = avgVol > 1000
    // Breakout Var%
    breakoutVar = abs(close – minValue)/close*100
    // Screener
    SCREENER[c1 and c2 and c3](breakoutVar as “Breakout Var%”)

    #201068 quote
    robertogozzi
    Moderator
    Master

    Sorry, I missed changing a line. Replace the line just below the line FOR…. with this one:

    if (close[i] < open[i]) then
    #201110 quote
    Mary
    Participant
    Average

    Thank you Robert,  screener working great!

    robertogozzi thanked this post
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Break out Screener with High Volume to the Down Side


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Mary @mila Participant
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by Mary
3 years, 5 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 09/18/2022
Status: Active
Attachments: No files
Logo Logo
Loading...