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
    enriquem
    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
    robertogozzi
    Moderator
    Master

    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.

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 robertogozzi
6 years, 1 month ago.

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