Thepremier
New member
Can someone help me with a script for an outside day and and an inside day? I would like to create a scan for them.
Last edited:
# Inside and Outside Bar
# Mobius
# 8.7.2017
def inside = high < high[1] and low > low[1];
def outside = high > high[1] or low < low[1];
AssignPriceColor(if inside
then color.cyan
else if outside
then color.yellow
else color.current);
Hi Robert. Can you tell me how to scan for Outside Bars on a daily/hourly? Thanks, coding is most difficult for me. Much appreciated.I would like to contribute to this forum by offering to answer questions for those of you who are coding your own indicators. If you are stuck on something, perhaps I can help you figure it out.
# Outside Bar
# Mobius
# 3.1.2016
# In order to mark outside bars with a YELLOW dot, just use
# change the arrows to points and the color to whatever you
# wish
#
# SetPaintingStrategy(PaintingStrategy.Points)
plot Bullish = high > high[1] and
low < low[1] and
close > open;
Bullish.SetPaintingStrategy(PaintingStrategy.Boolean_Arrow_Up);
Bullish.SetDefaultColor(Color.Green);
Bullish.setLineWeight(3);
plot Bearish = high > high[1] and
low < low[1] and
close < open;
Bearish.SetPaintingStrategy(PaintingStrategy.Boolean_Arrow_Down);
Bearish.SetDefaultColor(Color.Red);
Bearish.setLineWeight(3);
# Inside and Outside Bar
# Mobius
# 8.7.2017
def inside = high < high[1] and low > low[1];
plot signal = inside within 1 bars;
def inbar = low > low[1] and high < high[1];
def outbar = low < low[1] and high > high[1];
def holygrail = outbar[1] and inbar;
AddChartBubble(inbar and !holygrail, high, "IB", color.CYAN);
AddChartBubble(outbar and !holygrail[-1], high, "OB", color.MAGENTA);
AddChartBubble(holygrail, high, "Holy Grail - In Bar", color.CYAN);
AddChartBubble(holygrail[-1], low, "Holy Grail - Out Bar", color.CYAN, no);
What are the rules for Buy or Sell entry ?I can't seem to get this working: Can someone take a look and see what's wrong here? Thanks I have no coding skills. This was posted on Twitter and said to work on TOS, but not for me.
// TW - Holy Grail
// highlights holy grail pattern
study(title="TW - Holy Grail", shorttitle="TW - Holy Grail", overlay=true)
outBar = low[1] < low[2] and high[1] > high[2]
inBar = low > low[1] and high < high[1]
holyGrail = inBar and outBar == 1
barcolor (holyGrail ==1 ? yellow : na)
barcolor (holyGrail ==1 ? yellow : na, offset = -1)
No rules it’s just showing the inside bar yellow for the holly grail set up I think.What are the rules for Buy or Sell entry ?
Thanks so much! I haven’t tried but I’m blown away how friendly everyone is to help out! Thank u......Here is a simple version:
Code:def outBar = low[1] < low[2] and high[1] > high[2]; def inBar = low > low[1] and high < high[1]; def holyGrail = inBar and outBar; assignPriceColor(if holyGrail then color.yellow else color.current);
I'm wondering if the same script can be used as a scanner?What are the rules for Buy or Sell entry ?
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
How to create alerts for Outside Bars | Questions | 1 | ||
M | show which stocks trade outside the zone | Questions | 2 | |
O | Outside Bar High/Low | Questions | 4 | |
K | Full candle outside of Bollinger Band | Questions | 7 | |
D | Inside Bar OutSide Bar Clouds For ThinkOrSwim | Questions | 4 |
Start a new thread and receive assistance from our community.
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.
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.