It’s like this.
The present candlesticks (after closing) range is higher & lower than the previous candlesticks range and closes above the prevoius bars high (bullish) or below the previous bars low (bearish)
The body of the candlestick does NOT need to engulf the prevoius body.
In short, the last candlesticks range engulfs the previous candlesticks range and closes above or below the high/low och the previous candlestick, no matter what colour the previous candlestick is (regardless of the pic below).
reference: https://www.prorealcode.com/topic/outside-reversal-bar-indicator/
Give your topic a meaningful title.Describe your question or your subject in your title. Do not use meaningless titles such as ‘Coding Help Needed’.
Moreover, what’s your question?
range is higher & lower
you need to be more specific because it cannot be both
Pics should be attached, rather than embedded within the text of your post, to make the forum load faster.
Thank you 🙂
So you asking to code a screener that detects OUTSIDE:
- when they show a gap at opening
- when they make a swing point within the last N candles.
Got it. I’ll make it asap.
TheN00b – Please respect the few simple forum rules. I deleted the quote where you quoted yourself that then included massive images inserted into your post unnecessarily.
- Be careful when quoting others in your posts. Only use the quote option when you need to highlight a particular bit of text that you are referring to or to highlight that you are replying to a particular member if there are several involved in a conversation. Do not include large amounts of code in your quotes. Just highlight the text you want to quote and then click on ‘Quote’.
There you go:
LB = 40 //LookBack periods
Bullish = close > open
Bearish = close < open
// LONG outside bar
L1 = (low = lowest[LB](low))
L2 = Bullish
L3 = (low < low[1]) AND (high > high[1])
// SHORT outside bar
S1 = (high = highest[LB](high))
S2 = Bearish
S3 = (low < low[1]) AND (high > high[1])
//
Result = 0
IF L1 AND L2 AND L3 THEN
Result = 1
ELSIF S1 AND S2 AND S3 THEN
Result = 2
ENDIF
SCREENER[Result](Result AS "1=↑, 2=↓")
thank you so very much 4 taking the time 2 code this. im gonna give it a go.
I notice it only found Bearish OUTSIDE Bar
right now it only finds Bearish outside bar pattern. they works wonderfully when combine with Fibonacci , support and resistance.
I tested it and it could find both bearish and bullush patterns
Maybe too many items are returned, try to apply it to a shorter list.
I tried it, it doesn’t find it.
see attachment, great example of… when combine with market structures and volume.
i hope im not asking too much. thank you
You can replace 40 with a smaller value, down to 1.
very well. gonna try that. i will report back.
thank you