Support/Resistance LLH/HHL Indicator

dugafish

New member
I am trying to program an indicator in Thinkscript that will look back for most recent two important subsequent and ascending lows to obtain their corresponding price levels . The price of the lower of the two is subtracted from the price of the higher of the two and difference is then added to the higher of two. This level is then plotted as horizontal resistance line moving forward until the next setup replaces it. This resistance line is called LLH. A similar calculation can be obtained to calculate a support line by identifying most recent two important subsequent and descending highs and calculating the difference in price between the two highs and subtracting this amount from the lower of the two highs and potting this level as a resistance line moving forward until a next setup replaces it. The concept of importance for either the highs or lows can really be just a function of a definable lookback period (X bars back for example) of time or if there are obvious highs and lows on the charts that would make common sense to use.
 
I am trying to program an indicator in Thinkscript that will look back for most recent two important subsequent and ascending lows to obtain their corresponding price levels . The price of the lower of the two is subtracted from the price of the higher of the two and difference is then added to the higher of two. This level is then plotted as horizontal resistance line moving forward until the next setup replaces it. This resistance line is called LLH. A similar calculation can be obtained to calculate a support line by identifying most recent two important subsequent and descending highs and calculating the difference in price between the two highs and subtracting this amount from the lower of the two highs and potting this level as a resistance line moving forward until a next setup replaces it. The concept of importance for either the highs or lows can really be just a function of a definable lookback period (X bars back for example) of time or if there are obvious highs and lows on the charts that would make common sense to use.

i've read your post several times, and still have several questions.

...look back for most recent two important subsequent and ascending lows to obtain their corresponding price levels...

look at the previous 2 bars?
look at past bars to find 2 bars ... that are important?

what formula specifies that a bar is important? without this , can't go any farther.

...ascending lows...
is this a bar with a low that is higher than the previous bar?

...corresponding price levels...
the close of the bar?


...subtracting...
i think this is what you want. but i don't understand your rules for finding low1 and low2.
LLH = absvalue(low1 - low2) + max(low1, low2);
 

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

Good question .. the non programmatic answer for which 2 ascending prior lows is is to look at a chart and see two obvious prior ascending lows that fit that description. Those will most likely not be a few bars back.....they might be but they also might be 3 months ago....that's why I suggested a defined but variable(adjustable?) look back period of X bars as an input. Practically speaking they should be somewhat obvious when looking at a chart in any time frame... .but that's obviously not a rule based criteria. so not sure how that can be done programmatically.....but using some form of rule is better than nothing!

Yes your formula is correct mathematically.

what formula specifies that a bar is important? without this , can't go any farther.

It's the described chart pattern that's important...nothing else....that you find two subsequent and ascending lows .....essentially a zig zag chart pattern where the first zig is lower than the subsequent zag. You can omit the concept of importance.

ascending lows...
is this a bar with a low that is higher than the previous bar?.
Yes


subtracting...
i think this is what you want. but i don't understand your rules for finding low1 and low2.
LLH = absvalue(low1 - low2) + max(low1, low2)

Correct
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
562 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