BeardedQuant

Pinbar (30-50 Rule)

צפיות ‎3635‎
291
My first script to identify pin bars with a predefined rules, any feedbacks are welcome.

Rules

Bullish Candle

1. Body of the candle should be above the 50% of the day's price range

AND

2. Either the open or the close should be above the 30% of the day's price range

if both the above conditions are met then a bullish arrow is produced with "B".

Bearish Candle

1. Body of the candle should be below the 50% of the day's price range

AND

2. Either the open or the close should be below the 30% of the day's price range

if both the above conditions are met then a bearish arrow is produced with "S".

Thanks

Hope this indicator helps you identify trading entries.
סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר סקריפט זה פרסם אותו עם קוד פתוח, כך שסוחרים יוכלו להבין ולאמת זאת. הידד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסום הנו בכפוף ל כללי הבית . אתה יכול להגדירו כמועדף ולהשתמש בו בגרף.

רוצה להשתמש בסקריפ זה בגרף?

תגובות

How do I appy this to a forex chart in Trading View?
השב
Adding the below two lines would result create an alert whenever the above rule is satisfied.

alerts = (bearishpin or bullishpin)
alertcondition(alerts,"PinBar","PinbBar")

Though user has to add the alert to the market they want it to be. Alert can be added by

Paste the two line code to the script of Pinbar (30-50) script, then add it to chart of the market of your preference
Then go to alert section on the right (second option from the top)
Then add to alert or create new alert

In condition dropdown you should see your market name, change that pinbar then in the next section automatically it should change to PinBar if not select it.

Then you can choose how you want the alert to be per your own choice with your own message etc. I have created this alert to give me one signal and not specific buy or sell signal. You can split the code to do that easily.

Hope this helps
השב