2 bars consecutive..

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #206231 quote
    amitoverseas40
    Participant
    Junior

    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

    #206243 quote
    JS
    Participant
    Veteran

    Hi,

    What kind of bullish and bearish bars were you thinking about?

     (There are so many different…)

    #206248 quote
    amitoverseas40
    Participant
    Junior
    Bullish bar is when close is higher than previous,  vice versa for bearish…
    #206250 quote
    amitoverseas40
    Participant
    Junior
    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…
    #206251 quote
    JS
    Participant
    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)
    Scherm­afbeelding-2022-12-23-om-22.13.14.png Scherm­afbeelding-2022-12-23-om-22.13.14.png
    #206256 quote
    amitoverseas40
    Participant
    Junior
    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..
    cc.png cc.png
    #206258 quote
    amitoverseas40
    Participant
    Junior
    Much better in latest as I removed the wicks….
    cc2.png cc2.png cc3.png cc3.png
    #206262 quote
    JS
    Participant
    Veteran
    Hi @amitoverseas40 This screenshot is exactly the same as the previous one only now in histogram style…
    Scherm­afbeelding-2022-12-23-om-22.58.20.png Scherm­afbeelding-2022-12-23-om-22.58.20.png
    #206264 quote
    amitoverseas40
    Participant
    Junior
    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…
    cc4.png cc4.png
    #206266 quote
    amitoverseas40
    Participant
    Junior
    Questions marks highlight
    1. missing signal.
    2. false signal
    3. missing signal..
    cc5.png cc5.png
    #206268 quote
    JS
    Participant
    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… 😉
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.

2 bars consecutive..


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

This topic contains 10 replies,
has 2 voices, and was last updated by JS
3 years, 2 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 12/23/2022
Status: Active
Attachments: 7 files
Logo Logo
Loading...