Inside Candle Up or Down using BODY of Mother candle NOT wick.

QuantumSense

New member
I'm sure this is super simple, but I have no idea about coding or programming. I am trying to make an indicator that paints an Inside and Up and Inside and Down formation like the ones I have seen from Mobius, BUT using the BODY of the "Mother Candle" not the wick.

See attached screenshots.

Eg.

(Using generic numbers as price. $5, $7 ect. painting a picture w/ text)

Mother candle = opens at 5, range 3-7 close at 6.
Inside candle = Closes at 4
Trigger candle = Opens at 4, moves to 8 but comes back down and closes at 2 = DOWN formation. (I use this example because this is common and a problem I could see. The close is what is important, however I would like a repainting situation if possible, where in above example, once "Trigger Candle" moves above 4 to 5 (creating an IAU formation and continues to 8, (paints as an IAU formation) but then comes back down through 4 and closing at 3 Creating an a Down formation (switches to Down formation *Looking for a Painted Up or Down Arrow above/Below the Inside candle ****Inside Mother Candle BODY)

Sorry if that is a bad explanation.


Thank you so much if anyone can help. I just want a visual on that formation that I can use against certain levels.
***Also if I can use this on any timeframe, that would be prefered, but if it has to be narrowed to a single timeframe(s)
5 Min is most important followed by 30 min, 2hour and Daily.***




Something like this but with an UP/Down Arrow or some other Visual Cue Above/Below Inside Candle., but using the Body of the "Mother Candle"(candle on left of inside candle) instead of the wicks like this uses. I can read the Trigger candle, thats fine. I just want that Inside Candle to POP once it closes.

# 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);

plot data = close;
data.hide();

An up arrow for IAU and down arrow for IAD or some other visual cue other than candles also.

Example
"Mother Candle"
"Inside Candle" = Paints Up or Down arrow above this once it either closes inside the BODY of Mother candle and or once "Trigger Candle" BREAKS Body High/Low of Inside Candle with repainting arrow if needed, as in, stated above breaks UP=Paints up but before 5m candle finishes, comes back and breaks LOW of Inside candle body = repaints as Down candle"
"Trigger Candle"

I know this is 3 posts, just trying to be as specific as possible since yall are helping me and your time is valuable. Thank you!!


What I am trying to accomplish.

1 = Mother Candle
2= Inside Candle (Up or Down)
3= Trigger candle (In this instance it is Down)
pBuI1T2.png


This is a random ttm_Scalper arrow I found that was where I wanted it to be for a visual Representation for yall. But If I could get this on every Inside and Down and Inside and Up Candle/formation that would be Amazing.

OR, just above/below the INSIDE candle and I can manually read the Outside (Trigger) candle if option #1 is too much a pain.



Example of Inside UP candles/Formations and Inside Down And where I'm looking for Arrows.

JTyn8ou.png



Another Example Drawn out.

3PCEiln.png


what do you mean by 5 3 7 6 4 ?
Just using numbers. $5, $3, $7, $6, $4 ect. Lol, trying to paint a picture with text.
 
Last edited by a moderator:
Solution
I'm sure this is super simple, but I have no idea about coding or programming. I am trying to make an indicator that paints an Inside and Up and Inside and Down formation like the ones I have seen from Mobius, BUT using the BODY of the "Mother Candle" not the wick.

See attached screenshots.

Eg.

(Using generic numbers as price. $5, $7 ect. painting a picture w/ text)

Mother candle = opens at 5, range 3-7 close at 6.
Inside candle = Closes at 4
Trigger candle = Opens at 4, moves to 8 but comes back down and closes at 2 = DOWN formation. (I use this example because this is common and a problem I could see. The close is what is important, however I would like a repainting situation if possible, where in above example, once...
I'm sure this is super simple, but I have no idea about coding or programming. I am trying to make an indicator that paints an Inside and Up and Inside and Down formation like the ones I have seen from Mobius, BUT using the BODY of the "Mother Candle" not the wick.

See attached screenshots.

Eg.

(Using generic numbers as price. $5, $7 ect. painting a picture w/ text)

Mother candle = opens at 5, range 3-7 close at 6.
Inside candle = Closes at 4
Trigger candle = Opens at 4, moves to 8 but comes back down and closes at 2 = DOWN formation. (I use this example because this is common and a problem I could see. The close is what is important, however I would like a repainting situation if possible, where in above example, once "Trigger Candle" moves above 4 to 5 (creating an IAU formation and continues to 8, (paints as an IAU formation) but then comes back down through 4 and closing at 3 Creating an a Down formation (switches to Down formation *Looking for a Painted Up or Down Arrow above/Below the Inside candle ****Inside Mother Candle BODY)

Sorry if that is a bad explanation.


Thank you so much if anyone can help. I just want a visual on that formation that I can use against certain levels.
***Also if I can use this on any timeframe, that would be prefered, but if it has to be narrowed to a single timeframe(s)
5 Min is most important followed by 30 min, 2hour and Daily.***




Something like this but with an UP/Down Arrow or some other Visual Cue Above/Below Inside Candle., but using the Body of the "Mother Candle"(candle on left of inside candle) instead of the wicks like this uses. I can read the Trigger candle, thats fine. I just want that Inside Candle to POP once it closes.

# 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);

plot data = close;
data.hide();

An up arrow for IAU and down arrow for IAD or some other visual cue other than candles also.

Example
"Mother Candle"
"Inside Candle" = Paints Up or Down arrow above this once it either closes inside the BODY of Mother candle and or once "Trigger Candle" BREAKS Body High/Low of Inside Candle with repainting arrow if needed, as in, stated above breaks UP=Paints up but before 5m candle finishes, comes back and breaks LOW of Inside candle body = repaints as Down candle"
"Trigger Candle"

I know this is 3 posts, just trying to be as specific as possible since yall are helping me and your time is valuable. Thank you!!


What I am trying to accomplish.

1 = Mother Candle
2= Inside Candle (Up or Down)
3= Trigger candle (In this instance it is Down)


This is a random ttm_Scalper arrow I found that was where I wanted it to be for a visual Representation for yall. But If I could get this on every Inside and Down and Inside and Up Candle/formation that would be Amazing.

OR, just above/below the INSIDE candle and I can manually read the Outside (Trigger) candle if option #1 is too much a pain.

Example of Inside UP candles/Formations and Inside Down And where I'm looking for Arrows.

Another Example Drawn out.
hal_3bar
Just using numbers. $5, $3, $7, $6, $4 ect. Lol, trying to paint a picture with text.


this finds a 3 bar pattern,
.. mother bar, inside bar, trigger bar


finds inside bars,
.. based on the candle body, not wicks,
.. a smaller body after a taller body,
.. draws gray wedges above and below the bar

find a trigger bar, (3rd bar)
.. draw an arrow on the bar (red or green)
.. can choose to force trigger bar to overlap the inside bar, or allow it to be beyond the inside bar. (default is, not force overlap)


i used wedges for inside bars and set the color to be gray, so it is something visible, but not too big of a shape and not too obnoxious.

to get text to appear on a chart, bubbles would have to be used. i think if too many appear, it just clutters up the chart, so i didn't use them. i just used arrows on the trigger bars.


------------------

in the future, don't make up abbreviations and then not explain what they are.
iau , iad, have no meaning and just add confusion.


Code:
# inside_body_trigger_00

#https://usethinkscript.com/threads/inside-candle-up-or-down-using-body-of-mother-candle-not-wick.14205/
#Inside Candle Up or Down using BODY of Mother candle NOT wick.


# 3 bar pattern
#  draw wedges on inside bar, bar 2
#  draw arrow on trigger bar, bar 3

def na = double.nan;
#def isup = close>open;
#def isdwn = close<open;
def bodytop = max(open, close);
def bodybot = min(open, close);

input force_trigger_bar_to_overlap_inside_bar = no;
def trx = force_trigger_bar_to_overlap_inside_bar;


# inside bar, 2nd bar
def inside = bodytop[1] >= bodytop[0] and bodybot[1] <= bodybot[0];

plot zintop = inside;
zintop.SetPaintingStrategy(PaintingStrategy.BOOLEAN_wedge_up);
#zintop.SetDefaultColor(color.yellow);
zintop.SetDefaultColor(color.light_gray);
zintop.SetLineWeight(2);

plot zinbot = inside;
zinbot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_wedge_down);
#zinbot.SetDefaultColor(color.yellow);
zinbot.SetDefaultColor(color.light_gray);
zinbot.SetLineWeight(2);


# trigger bar, 3rd bar
def triggerup = (inside[1]
 and (if trx then bodybot < bodytop[1] else 1)
 and bodybot > bodybot[1]
 and bodytop > bodytop[1]);

def triggerdwn = (inside[1]
 and (if trx then bodytop > bodybot[1] else 1)
 and bodytop < bodytop[1]
 and bodybot < bodybot[1]);


def vert = 0.001;
plot zup = if triggerup then (low*(1-vert)) else na;
zup.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
zup.SetDefaultColor(color.green);
zup.SetLineWeight(3);

plot zdwn = if triggerdwn then (high*(1+vert)) else na;
zdwn.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
zdwn.SetDefaultColor(color.red);
zdwn.SetLineWeight(3);
#

wedges (small arrows) on inside bars
green/red arrows on trigger bars

ERI8B6h.jpg
 
Last edited:
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
466 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