Mobius High Low Reversal Thinkscript, I need Some Help

crn2920

New member
Here is a trend reversal that Mobius created back in 2018. I can't figure out why the Thinkscript isn't plotting when a candle closes above the day's highest price of the lowest low candle. I'd also like to have the down arrow red along with a red trend line of the lowest price on the highest high candle and green trend line of the highest price on the lowest low candle and the up arrow green when a candle closes higher than the highest price on the lowest low candle.

Thank you.

https://usethinkscript.com/threads/...dicator-intraday-strategy-for-thinkorswim.49/
Code:
# Regular Trading Hours High and Low Reversals
# Mobius
# V01.08.20.2018 Chat Room Request
# Alerts added by BenTen at useThinkScript.com

def h = high;

def l = low;

def c = close;

def x = barNumber();

def nan = double.nan;

def rth = getTime() >= RegularTradingStart(getYYYYMMDD()) and

getTime() <= RegularTradingEnd(getYYYYMMDD());

def LOD = if rth and !rth[1]

then l

else if rth and l < LOD[1]

then l

else LOD[1];

def LOD_x = if l == LOD and rth

then x

else nan;

def LOD_h = if l == LOD

then h

else LOD_h[1];

plot LOD_h_line = if x >= highestAll(LOD_x)

then highestAll(if isNaN(c[-1])

then LOD_h

else nan)

else nan;

LOD_h_line.SetDefaultColor(createColor(4,4,4));

LOD_h_line.hideBubble();

LOD_h_line.hideTitle();

def upBar = if c crosses above LOD_H_line and RTH

then x

else upBar[1];

plot ArrowUP = if x == highestAll(upBar)

then l - (2*TickSize())

else nan;

ArrowUP.SetPaintingStrategy(PaintingStrategy.Arrow_UP);

ArrowUP.SetLineWeight(3);

ArrowUP.SetDefaultColor(createColor(25,180,25));

ArrowUP.HideBubble();

ArrowUP.HideTitle();

def HOD = if rth and !rth[1]

then h

else if rth and h > HOD[1]

then h

else HOD[1];

def HOD_x = if h == HOD and rth

then x

else nan;

def HOD_l = if h == HOD

then l

else HOD_l[1];

plot HOD_l_line = if x >= highestAll(HOD_x)

then highestAll(if isNaN(c[-1])

then HOD_l

else nan)

else nan;

HOD_l_line.SetDefaultColor(createColor(75, 55, 175));

HOD_l_line.HideTitle();

HOD_l_line.HideBubble();

def dnBar = if c crosses below HOD_l_line

then x

else dnBar[1];

plot ArrowDN = if x == highestAll(dnBar)

then h + (2*TickSize())

else nan;

ArrowDN.SetPaintingStrategy(PaintingStrategy.Arrow_DOWN);

ArrowDN.SetLineWeight(3);

ArrowDN.SetDefaultColor(createColor(75,55,175));

ArrowDN.HideBubble();

ArrowDN.HideTitle();

# Alerts
Alert(ArrowUP, " ", Alert.Bar, Sound.Chimes);
Alert(ArrowDN, " ", Alert.Bar, Sound.Bell);
# End Code
 
Last edited by a moderator:

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