Up day indicator

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #162898 quote
    Alfy
    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
    robertogozzi
    Moderator
    Master

    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
    Vonasi
    Moderator
    Master
    a = summation[15](close > close[1]) >= 12
    
    return a
    Alfy thanked this post
    #162902 quote
    Alfy
    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.

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 Alfy
4 years, 11 months ago.

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