Is it possible to count events?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #112667 quote
    jebus89jebus89
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    jebus89jebus89
    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
    VonasiVonasi
    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.
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

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 VonasiVonasi
6 years, 10 months ago.

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