Up day indicator

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #162898 quote
    AlfyAlfy
    Participant
    Average

    Hi guys, im looking to create an indicator that shows when a stock has had 12 or more “up days” out of the last 15 with an “up day” defined as close to previous close. Can anyone help?

    Best regards

    #162900 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    There you go (not tested):

    Distance = 3 * PipSize  //distance to consider a price close to another one
    IsClose  = ((close <= (close[1] + Distance)) and ((close >= (close[1] - Distance))
    Cond     = (summation[15](IsClose) >= 12)
    Return Cond

    Change DISTANCE to set the desired distance.

    Alfy thanked this post
    #162901 quote
    VonasiVonasi
    Moderator
    Master
    a = summation[15](close > close[1]) >= 12
    
    return a
    Alfy thanked this post
    #162902 quote
    AlfyAlfy
    Participant
    Average

    Thanks so much to you both

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Up day indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Alfy @alfy Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by AlfyAlfy
5 years, 7 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/01/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...