Is it possible to count events?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #112667 quote
    jebus89
    Participant
    Master

    So lets say i want to count how many times High has crossed above highest high the past 50 times. Is this possible?

     

    So if High has crossed above highest high say 5 times last 50 candles i want to return the value 5.

    #112668 quote
    robertogozzi
    Moderator
    Master

    HIGH can only cross the highest high 1 time, since after that it becomes the new high and cannot exceed itself!

    You can set a fixed high, let’s say yesterday’s, then count how many time, if any, today it has been exceeded.

    #112726 quote
    jebus89
    Participant
    Master

    Right, of course, im looking at a highest high of last X bars.

    for example: for the last 100 candles, how many times have a high crossed over highest high 10 periods.

     

    How could i count that? (see photo)

    hh.png hh.png
    #112733 quote
    Vonasi
    Moderator
    Master
    a = high > highest[10](high[1])
    b = summation[100](a)
    
    return b
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Is it possible to count events?


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
jebus89 @jebus89 Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by Vonasi
6 years, 3 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 11/13/2019
Status: Active
Attachments: 1 files
Logo Logo
Loading...