High and Low Reversals Indicator + Intraday Strategy For ThinkOrSwim

Status
Not open for further replies.

New Indicator: Buy the Dip

Check out our Buy the Dip indicator and see how it can help you find profitable swing trading ideas. Scanner, watchlist columns, and add-ons are included.

Download the indicator

How would (HLRI) be coded to use Globex hours instead of RTH?

 
Last edited:
@mc01439 Do you mean using the indicator with pre-market data on or off?

 
Last edited:
@BenTen

Yes, I trade mostly CL and would like the indicator to work from Asia open.

 
Last edited:
Am often late when using RTH with high volume futures.

 
Last edited:
input RangeStart = {default Globex, RTH};

def First; switch (RangeStart) {case Globex: First = if GetTime() >= RegularTradingEnd(GetYYYYMMDD()) then 1 else 0; case RTH: First = if GetTime() >= RegularTradingStart(GetYYYYMMDD()) then 1 else 0;}

Tried this but I do not get down signals and the lines do not look correct?

This one did not work at all.

#def First; switch (RangeStart) {case Globex: First = if GetTime() >= RegularTradingEnd(GetYYYYMMDD()) and getTime() <= RegularTradingEnd(getYYYYMMDD()) then 1 else 0; case RTH: First = if GetTime() >= RegularTradingStart(GetYYYYMMDD()) and getTime() <= RegularTradingEnd(getYYYYMMDD()) then 1 else 0;}

 
Last edited:
This one did not work at all.

#def First; switch (RangeStart) {case Globex: First = if GetTime() >= RegularTradingEnd(GetYYYYMMDD()) and getTime() <= RegularTradingEnd(getYYYYMMDD()) then 1 else 0; case RTH: First = if GetTime() >= RegularTradingStart(GetYYYYMMDD()) and getTime() <= RegularTradingEnd(getYYYYMMDD()) then 1 else 0;}

 
Last edited:
@mc01439 I also would like to know that, but I would assume the same way only using Globex's range.

 
Last edited:
rliI41Q.png


This with

def First; switch (RangeStart) {case Globex: First = if GetTime() >= RegularTradingEnd(GetYYYYMMDD()) then 1 else 0; case RTH: First = if GetTime() >= RegularTradingStart(GetYYYYMMDD()) then 1 else 0;}

The Globex lines (mark with red circle) do not look correct?

 

Attachments

  • rliI41Q.png
    rliI41Q.png
    226.6 KB · Views: 108
Last edited:
@mc01439 What is the study that plots those red/green horizontal levels? Would you please share it?

 
Last edited:
Can be found here - it is "Support Resistance by Mobius".

 
Last edited by a moderator:
@mc01439 Your link led to a Microsoft login page. I went ahead and posted the direct code below for @john3



Rich (BB code):
# Mobius
# Mobius on My Trade
# Support / Resistance           
# V01.06.2012 V02.08.2013
# Added lower bar for clouds, Volume condition for plot and Vertical line for time.

input n = 13;
input ShowLines = yes;
input PlotTime = 1215; #hint PlotTime: Enter Bars End to plot Bars Start 0 for none.

def h = high;
def l = low;
def v = volume;
def Firstbar = barNumber();
def Highest = fold i = 1 to n + 1 
with p = 1
while p 
do h > getValue(h,-i);

def HVn = if V == Highest(v, n) 
then l 
else Double.NaN;

def A = if (Firstbar > n 
and h == highest(h, n) 
and Highest) 
and HVn
then h 
else double.NaN;
def Alow = if (Firstbar > n
and h == highest(h, n)
and Highest)
and HVn
then l
else double.nan;
def Lowest = fold j = 1 to n + 1 
with q = 1
while q 
do l < getValue(l, -j);
def B = if (Firstbar > n 
and l == lowest(l, n) 
and Lowest)
and HVn 
then l 
else double.NaN;
def Bhigh = if (Firstbar > n
and l == lowest(l, n)
and Lowest)
and HVn
then h
else double.nan;
def Al = if !isNaN(A) 
then A 
else Al[1];
def A2 = if !isNaN(Alow)
then Alow
else A2[1];
def Bl = if !isNaN(B) 
then B 
else Bl[1];
def B2 = if !isNaN(Bhigh)
then Bhigh
else B2[1];

plot ph = Round(A, 2);
ph.setPaintingStrategy(PaintingStrategy.VALUES_ABOVE);

plot hL = if Al > 0
then Al
else double.NaN;
hL.setHiding(!showLines);
hL.SetPaintingStrategy(PaintingStrategy.Dashes);
hL.SetDefaultColor(Color.Yellow);
plot hL2 = if A2 > 0
then A2
else double.nan;
hL2.setHiding(!showLines);
hL2.SetPaintingStrategy(PaintingStrategy.Dashes);
hL2.SetDefaultColor(Color.Yellow);
AddCloud(hL, hL2, Color.Light_Red, Color.Light_Red);

plot pl = Round(B, 2);
pl.setPaintingStrategy(PaintingStrategy.VALUES_BELOW);

plot ll = if Bl > 0 
then Bl 
else double.NaN;
ll.setHiding(!showLines);
ll.SetPaintingStrategy(PaintingStrategy.Dashes);
ll.SetDefaultColor(Color.Blue);
plot lH = if B2 > 0
then B2
else Double.NaN;
lH.setHiding(!showLines);
lH.SetPaintingStrategy(PaintingStrategy.Dashes);
lH.SetDefaultColor(Color.Blue);
AddCloud(ll, lH, Color.Light_Green, Color.Light_Green);

# Time Markers
AddVerticalLine(SecondsTillTime(PlotTime) == 0, "", Color.Red, Curve.Short_Dash);

plot priceLine = highestAll(if isNaN(close[-1]) 
and !isNAN(close) 
then close 
else Double.NaN);
priceLine.SetStyle(Curve.Long_Dash);
priceLine.SetDefaultColor(CreateColor(75,75,75));
priceLine.SetLineWeight(1);
# End Code
 
Last edited:
Found the answer on TOS chat - #5/2/2019 mbh - Changed for Asia and Europe use.



def active = secondsfromtime(1800) >= 0 or secondstilltime(400)>=0;

 
Last edited:
@BenTen Would you please elaborate a little in plain English on how the Mobius' support/resistance works? What does it use to figure out the levels? Thank you.

 
Last edited:
@john3 - I USE TO REPLACE FRACALS AS SUPPORT/RESISTANCE ZONES FOR A CLEANER CHART. YOU CAN ADJUST THE SENSITIVITY BY CHANGING input n = 8; #13. I USE 8 DEFAULT IS 13. YOU CHANGE TO FIT INSTRUMENT, STYLE AND CONDITIONS IF YOU WISH, I KEEP AT 8 FOR ALL CHARTS AND INSTRUMENTS.

THERE ARE A NUMBER OF WAYS IT CAN BE USED – UP TO THE TRADER.

IT IS BASICLY LOOKING FOR HIGHS AND LOWS WERE THERE MAY BE SUPPORT AND RESISTANCE. PLAY WITH INPUT N AND THAT WILL GIVE YOU A GOOD IDEA OF HOW IT WORKS.

 
Last edited:
@john3 - I USE TO REPLACE FRACALS AS SUPPORT/RESISTANCE ZONES FOR A CLEANER CHART. THE INDICATOR IS MARKING THE HIGH AND LOW OF THE FRACTAL (PIVOT) BAR. YOU CAN ADJUST THE SENSITIVITY BY CHANGING input n = 8; #13. I USE 8 DEFAULT IS 13. YOU CHANGE TO FIT INSTRUMENT, STYLE AND CONDITIONS IF YOU WISH, I KEEP AT 8 FOR ALL CHARTS AND INSTRUMENTS.



THERE ARE A NUMBER OF WAYS IT CAN BE USED – UP TO THE TRADER.

IT IS BASICLY LOOKING FOR HIGHS AND LOWS WERE THERE MAY BE SUPPORT AND RESISTANCE. PLAY WITH INPUT N AND THAT WILL GIVE YOU A GOOD IDEA OF HOW IT WORKS.

 
Last edited:
@john3 When it comes to Support and Resistance, I would much prefer to draw them manually since any indicators would miss out on a lot of important S/R areas.

 
Last edited:
This code for the S&R study is generating vertical red dotted lines and nothing like what mc01439 showed in screenshot.

@mc01439 Your link led to a Microsoft login page. I went ahead and posted the direct code below for @john3

Rich (BB code):
# Mobius
# Mobius on My Trade
# Support / Resistance          
# V01.06.2012 V02.08.2013
# Added lower bar for clouds, Volume condition for plot and Vertical line for time.

input n = 13;
input ShowLines = yes;
input PlotTime = 1215; #hint PlotTime: Enter Bars End to plot Bars Start 0 for none.

def h = high;
def l = low;
def v = volume;
def Firstbar = barNumber();
def Highest = fold i = 1 to n + 1
with p = 1
while p
do h > getValue(h,-i);

def HVn = if V == Highest(v, n)
then l
else Double.NaN;

def A = if (Firstbar > n
and h == highest(h, n)
and Highest)
and HVn
then h
else double.NaN;
def Alow = if (Firstbar > n
and h == highest(h, n)
and Highest)
and HVn
then l
else double.nan;
def Lowest = fold j = 1 to n + 1
with q = 1
while q
do l < getValue(l, -j);
def B = if (Firstbar > n
and l == lowest(l, n)
and Lowest)
and HVn
then l
else double.NaN;
def Bhigh = if (Firstbar > n
and l == lowest(l, n)
and Lowest)
and HVn
then h
else double.nan;
def Al = if !isNaN(A)
then A
else Al[1];
def A2 = if !isNaN(Alow)
then Alow
else A2[1];
def Bl = if !isNaN(B)
then B
else Bl[1];
def B2 = if !isNaN(Bhigh)
then Bhigh
else B2[1];

plot ph = Round(A, 2);
ph.setPaintingStrategy(PaintingStrategy.VALUES_ABOVE);

plot hL = if Al > 0
then Al
else double.NaN;
hL.setHiding(!showLines);
hL.SetPaintingStrategy(PaintingStrategy.Dashes);
hL.SetDefaultColor(Color.Yellow);
plot hL2 = if A2 > 0
then A2
else double.nan;
hL2.setHiding(!showLines);
hL2.SetPaintingStrategy(PaintingStrategy.Dashes);
hL2.SetDefaultColor(Color.Yellow);
AddCloud(hL, hL2, Color.Light_Red, Color.Light_Red);

plot pl = Round(B, 2);
pl.setPaintingStrategy(PaintingStrategy.VALUES_BELOW);

plot ll = if Bl > 0
then Bl
else double.NaN;
ll.setHiding(!showLines);
ll.SetPaintingStrategy(PaintingStrategy.Dashes);
ll.SetDefaultColor(Color.Blue);
plot lH = if B2 > 0
then B2
else Double.NaN;
lH.setHiding(!showLines);
lH.SetPaintingStrategy(PaintingStrategy.Dashes);
lH.SetDefaultColor(Color.Blue);
AddCloud(ll, lH, Color.Light_Green, Color.Light_Green);

# Time Markers
AddVerticalLine(SecondsTillTime(PlotTime) == 0, "", Color.Red, Curve.Short_Dash);

plot priceLine = highestAll(if isNaN(close[-1])
and !isNAN(close)
then close
else Double.NaN);
priceLine.SetStyle(Curve.Long_Dash);
priceLine.SetDefaultColor(CreateColor(75,75,75));
priceLine.SetLineWeight(1);
# End Code
 
Is anyone still using this indicator? I loaded it and looked at it on a few tickers today and it looks pretty promising.
 
Status
Not open for further replies.

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