n Candles in a row

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #19531 quote
    jbyrne
    Participant
    Average

    Hi, I’m attempting to add a piece of code into my screener that looks for stocks that are;

    Above/below  1% on the day, last 4 or 5 candles(5 min) are all of the same direction/type, and during those 4 or 5 candles the stock traveled at least 0.5%.

    It’s proving to be alot harder than I thought since none of my attempts are working out. So if anyone could help me out/point me in the right direction that would be great.

    I’ve been using one stock to base my code off so I would know if it’s working or not, which is why I’m using a very specific Time condition.

    Thanks in advance and Happy New Year! 🙂

    Here’s a picture of the stock I’m basing my code off(15:55pm to 16:20pm) https://gyazo.com/aec1bc07101be43852076eccb689f82c and Below is my code so far:

     

    tcondition = time>160000 and time<170000

    timeframe (daily)
    BullonDay = variation>1
    BearonDay = variation<-1

    Timeframe (5 minutes)
    BullBody = (close > open)

    Bull4 = summation[4](bullbody)+(variation(close))>=0.5
    Bull5 = summation[5](bullbody)+(variation(close))>=0.5

    Bull = Bull4 or Bull5

    BullRow = Bull and BullonDay

    BearBody = (close < open)

    Bear4 = summation[4](bearbody)+(variation(close))>=0.5
    Bear5 = summation[5](bearbody)+(variation(close))>=0.5

    Bear = Bear4 or Bear5

    BearRow = Bear and BearonDay
    Screener [BearRow or BullRow]

    #19534 quote
    Wing
    Participant
    Veteran
    if close[4]>dclose(1)*1.005 and close>dclose(1)*1.01 and close>open and close[1]>open[1] and close[2]>open[2] and close[3]>open[3] then
    BullConditions=1
    endif
    
    
    if close[5]>dclose(1)*1.005 and close>dclose(1)*1.01 and close>open and close[1]>open[1] and close[2]>open[2] and close[3]>open[3] and close[4]>open[4] then 
    BullConditions=1 
    endif

     

    Does something like that work for bullish?

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

n Candles in a row


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
jbyrne @jbyrne Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Wing
9 years, 2 months ago.

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