Higher High, Low Low Indicator

Infb11

New member
Can someone help me create an indicator that places the following on a candle or bar: HH, HL, LH, LL based on the price action?

Top of candle/bar
HH- Higher high than previous candle
HL - Higher low of the previous candle

Bottom of Candle
LH - Lower high of the previous candle
LL - Lower low of the previous candle
 
Solution
Can someone help me create an indicator that places the following on a candle or bar: HH, HL, LH, LL based on the price action?

Top of candle/bar
HH- Higher high than previous candle
HL - Higher low of the previous candle

Bottom of Candle
LH - Lower high of the previous candle
LL - Lower low of the previous candle

this will draw bubbles based on if the current bar has a HH, HL, LL, LH
the default is to look back 1 bar and compare. when at 1, there are alot of bubbles.

can change the quantity of bars to look back,
input bars_back = 1
try changing it to 3 or 6 or... then it will find fewer.


Ruby:
# higher_hi_lower_lo_bubbles00

# above candle
#HH - Higher high than previous candle
#HL - Higher low of the previous candle

#...
Can someone help me create an indicator that places the following on a candle or bar: HH, HL, LH, LL based on the price action?

Top of candle/bar
HH- Higher high than previous candle
HL - Higher low of the previous candle

Bottom of Candle
LH - Lower high of the previous candle
LL - Lower low of the previous candle

this will draw bubbles based on if the current bar has a HH, HL, LL, LH
the default is to look back 1 bar and compare. when at 1, there are alot of bubbles.

can change the quantity of bars to look back,
input bars_back = 1
try changing it to 3 or 6 or... then it will find fewer.


Ruby:
# higher_hi_lower_lo_bubbles00

# above candle
#HH - Higher high than previous candle
#HL - Higher low of the previous candle

# below candle
#LH - Lower high of the previous candle
#LL - Lower low of the previous candle

input bars_back = 1;
addlabel(1, "compare to " + bars_back + " bars back", color.yellow);

def hh2 = highest(high[1], bars_back);
def hl2 = highest(low[1], bars_back);
def ll2 = lowest(low[1], bars_back);
def lh2 = lowest(high[1], bars_back);

def hh = if high > hh2 then 1 else 0;
def hl = if low > hl2 then 1 else 0;
def ll = if low < ll2 then 1 else 0;
def lh = if high < lh2 then 1 else 0;

def vert = 0.002;
addchartbubble( hh, high*(1+vert), "HH", color.green  ,yes);
addchartbubble( hl, high*(1+vert), "HL", color.light_green , yes);
addchartbubble( ll, low*(1-vert), "LL", color.red, no);
addchartbubble( lh, low*(1-vert), "LH", color.light_red, no);
#


bars back = 1 , many bubbles
plGFT0v.jpg


bars back = 6 , fewer bubbles
N53xUAe.jpg
 
Solution

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
445 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