Detect how may weeks were closed with higher price than lowest of previous week.

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

    Hello

    I am still learning, but—still diffuse for me…

    I am trying to do a code to detect how many weeks in a period ; for example 30 weeks were closed with a end price higher than the lowest of the previous week,…

    but,….

    #118316 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Try this (not tested):

    Timeframe(Weekly)
    Count = summation[253](close > low[1])
    Timeframe(default)
    Screener[Count >= 5](Count As “Count”)

    254 is the max lookback bars, but since we refer to the previous LOW then 253 is the greatest number allowed here.

    You can change it to any other number less than 253 and greater than 0.

    As a filter I used 5, but you can try other numbers.

Viewing 2 posts - 1 through 2 (of 2 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

Detect how may weeks were closed with higher price than lowest of previous week.


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
enriquem @enriquemico Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
6 years, 8 months ago.

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