2 bars consecutive..
Forums › ProRealTime English forum › ProScreener support › 2 bars consecutive..
- This topic has 10 replies, 2 voices, and was last updated 2 years ago by JS.
-
-
12/23/2022 at 1:11 PM #206231
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
12/23/2022 at 4:53 PM #20624312/23/2022 at 9:24 PM #206248Bullish bar is when close is higher than previous, vice versa for bearish…
12/23/2022 at 9:38 PM #206250Sorry, 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…
12/23/2022 at 10:20 PM #206251Here 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
Two Bar Bullish/Bearish1234567891011121314151617xBullish = Close > Open[1]xBearish = Close < Open[1]If Close > Open[1] and Close[1] > Open[2] thenTwoBarBullish = 1ElseTwoBarBullish = 0EndIfIf Close < Open[1] and Close[1] < Open[2] thenTwoBarBearish = -1ElseTwoBarBearish = 0EndIfReturn TwoBarBullish as "TwoBarBullish" Coloured(0,255,0), TwoBarBearish as "TwoBarBearish" Coloured(255,0,0)12/23/2022 at 10:45 PM #206256Hi 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..
12/23/2022 at 10:53 PM #206258Much better in latest as I removed the wicks….
12/23/2022 at 11:00 PM #206262This screenshot is exactly the same as the previous one only now in histogram style…
12/23/2022 at 11:09 PM #206264Hi 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…
12/23/2022 at 11:16 PM #206266Questions marks highlight
- missing signal.
- false signal
- missing signal..
12/23/2022 at 11:22 PM #206268There 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… 😉
-
AuthorPosts
Find exclusive trading pro-tools on