Hi There,
Please can someone create an indicator and a screener to display last 2 bars, consecutive, either bullish or bearish on a chart. It can be anywhere in last x number of bars…
Regards
JSParticipant
Veteran
Hi,
What kind of bullish and bearish bars were you thinking about?
(There are so many different…)
Bullish bar is when close is higher than previous, vice versa for bearish…
Sorry, should’ve mentioned,
Bullish= close higher than previous open
Bearish= close lower than previous open… Key is OPEN IN BOTH.
2 bars closing lower than previous open
2 bars closing higher than previous open.
Must be consecutive though…
JSParticipant
Veteran
Hi
@amitoverseas40
Here is the indicator…
As bullish is now defined, the last bar can also be a bearish bar as long as the Close > Open[1].
The same goes for the bearish side…
Regards Jaap
xBullish = Close > Open[1]
xBearish = Close < Open[1]
If Close > Open[1] and Close[1] > Open[2] then
TwoBarBullish = 1
Else
TwoBarBullish = 0
EndIf
If Close < Open[1] and Close[1] < Open[2] then
TwoBarBearish = -1
Else
TwoBarBearish = 0
EndIf
Return TwoBarBullish as "TwoBarBullish" Coloured(0,255,0), TwoBarBearish as "TwoBarBearish" Coloured(255,0,0)
Hi JS,
Thanks but it’s not exactly what I am looking for.
See the attached, I need 2 bars consecutive anywhere on chart …..while I know that current bar will look at previous 2 BUT it can be anywhere so loop will be required I think..with absolute close rather than anything now I think of it..
Much better in latest as I removed the wicks….
JSParticipant
Veteran
Hi
@amitoverseas40
This screenshot is exactly the same as the previous one only now in histogram style…
Hi JS,
See attached now, either we are missing signals or getting false signals….This metthod works, just need to look adjustment in loop rather only looking for previous 2…
Questions marks highlight
- missing signal.
- false signal
- missing signal..
JSParticipant
Veteran
Hi
@amitoverseas40
There are no missing signals or false signals… 😉
The indicator shows how bullish and bearish are defined (two consecutive…)
”As bullish is now defined, the last bar can also be a bearish bar as long as the Close > Open[1]. The same goes for the bearish side…”
If you don’t mean this, then the definition of bullish and bearish needs to be adjusted… 😉