Reply To: Finding multiple bars in a row with the same high

Optuma Forums Optuma Scripting Finding multiple bars in a row with the same high Reply To: Finding multiple bars in a row with the same high

#47303
Darren
Darren
  • Topics: 28
  • Replies: 145
  • Posts: 173

Hi Rhiannon,

You can use the following in a Show Bar, which will highlight consecutive highs:

HIGH() == HIGH(1)

where HIGH() is the current bar, and HIGH(1) is the previous bar. To build a 1% tolerance you could do something like:

(HIGH() > (HIGH(1)*0.99)) and (HIGH() < (HIGH(1)*1.01))

Capture

For a scan you can use the BARSTRUE() function (Lecture 3 here), so where at least 3 highs are within 1% of each other:

BARSTRUE((HIGH() > (HIGH(1)*0.99)) and (HIGH() < (HIGH(1)*1.01)), LOOKBACK=3) == 3

Pin It on Pinterest

Share This

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close