Help creating Equal Highs and Lows Study

TheMik

New member
Hello, I’m new to ToS and already see how powerful it is. I’d like help creating a Equal Highs and Lows study to find symbols that have on their chart this setup. Maybe such an indicator already exists or something close that I can build on. I tried to build this by myself, but ran into the problem that ToS cannot completely delete already broken Equal High/Lows, and they ended up in the screener or in the watchlist column.

Goal: detect setups where price forms equal swing highs or lows
This would be used for stocks. It can be used in wathlist column, or to scan, does'n matter, but first at leas to get start.
Requirements:
  • Scan on 1-minute timeframe
  • Use only today’s session bars , starting from premarket
  • Define a swing point (“peak”):
    • High peak: highest high vs 3 bars left and right
    • Low peak: lowest low vs 3 bars left and right
    • Confirm after 3 bars to the right (detection delay)
  • Equal high/low detection:
    • Round prices to 2 decimals (e.g. 216.351 → 216.35)
    • Group peaks by rounded price
    • Plot horizontal lines where 2 or more equal peaks occur
  • Detect only unbroken grouped peaks (price hasn’t crossed the line yet) I don’t want to see EQH/L that are already broken, only this that was not broken yet.
  • In settings can be configured to display values greater than 2 or to choose to display value greater than 3 equal highs/lows.
My goal is to automatically identify symbols on the chart that have unbroken equal highs or lows, which could signal potential future breakouts if the setup is valid — without manually checking too many symbols on a such small timeframe.
This is how pattern look like visually what screener must find.
I would be very grateful for any help.
 

Attachments

  • 3 candles left.png
    3 candles left.png
    215.7 KB · Views: 2
  • example2 .png
    example2 .png
    28.6 KB · Views: 4
  • example3.png
    example3.png
    14.5 KB · Views: 2
  • example4.png
    example4.png
    43.6 KB · Views: 2

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
514 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top