Help with a pin bar screener

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #146799 quote
    Ryan
    Participant
    New

    Hi,

    I would value your assistance.

    I have not been able to configure a indicator to identify 1d pin bars where the the open must be with-in the bottom/top 50% (1/2) of the bar and the close must be with-in then bottom/top  33% (1/3rd) of the candle.

    hope this makes sense.

    Any assistance will be much appreciated

    thanks

    #146820 quote
    Nicolas
    Keymaster
    Master

    It depends of the color of the bar and of the direction of the pinbar: shooting star or hammer type?

    Look at this code from the library, you can adjust the factor (percentage/100) in the code: Pin bar detection

    #146853 quote
    Ryan
    Participant
    New

    thanks alot for the reply!

    im such a novice i still dont understand how to modify that code to suit.

    If for example i wanted to make it screen out hammer bars where the close must be in the top 30% of the bar and the open must be in the top 50% of the bar..

    could you tell me what to change

    thanks again

    #146854 quote
    Ryan
    Participant
    New

    sorry i forgot to click reply

    #146857 quote
    Nicolas
    Keymaster
    Master

    Here is the code to scan for hammer / pinbar:

    hammer = 0
    
    IF (high - low) > 2* abs(close - open) THEN   // définition d’une pin bar (étoile filante ou marteau)
    IF (high - open) < 0.5*(high - low) OR (high - close) < 0.3*(high-low) THEN
    hammer = 1
    ENDIF
    ENDIF
    
    screener[hammer]
    
    #146863 quote
    Ryan
    Participant
    New

    hi,

    just  to be clear I want the indicator to show me for example shooting star candles that have the open AND the close in the bottom 50% BUT must also have a open or a close in the bottom 30%.

    hope that makes sense?

    thanks alot again

    #146865 quote
    Nicolas
    Keymaster
    Master

    Sorry but you asked for a screener in the indicator forum section, so what do you want as the final code please?

    In your last message you were talking about hammer and now shooting star, please define in single post what is exactly needed here, we will all gain times! 🙂

    #146869 quote
    Ryan
    Participant
    New

    i know ive been very confusing sorry.

    it is an indicator i want not a screener.

    it doesn’t matter if it is a shooting star or a hammer to me.

    i just want it to indicate to me bars that have the open AND the close in the bottom 50% BUT must also have a open or a close in the bottom 30%. (bearish)

    and

    bars that have the open AND the close in the top 50% BUT must also have a open or a close in the top 30% (bulish)

    so in theory pin bars (shaped like a hammer or star) that meet them rules.

    #146875 quote
    Nicolas
    Keymaster
    Master

    The below indicator code marks the hammer and shooting star candlesticks according to your definition:

    shooting = (min(open,close)-low)/range<=.3 and (open-low)/range<=.5 and (close-low)/range<=.5
    hammer = (high-max(open,close))/range<=.3 and (high-open)/range<=.5 and (high-close)/range<=.5
    
    return -shooting,hammer
    #146878 quote
    Ryan
    Participant
    New

    thanks!!!

    #164328 quote
    Ryan
    Participant
    New

    Hi

    Im not sure if you can help me again..

    The indicator you made me for pin bars is brilliant.

    When a bullish pinbar is indicated I enter my trade 1 pip above that candle and place my stop loss 1 pip below the candle.

    i aim for 1/1 risk reward so target is the range of the candle above the candle in a bullish example.

    is there anyway to give me a visual reference of this?

    so for example when a bullish pin bar is indicated can it also show me a green zone above the candle starting 1 pip above the high all the way up to the range of the candle on top.

    thanks

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.

Help with a pin bar screener


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Ryan @ryank20 Participant
Summary

This topic contains 10 replies,
has 2 voices, and was last updated by Ryan
4 years, 11 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 10/09/2020
Status: Active
Attachments: No files
Logo Logo
Loading...