TradingView
BeardedQuant
2019年11月11日午前7時10分

Pinbar (30-50 Rule) 

UK 100 INDEXTVC

詳細

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.
コメント
BoomBustInvest
How do I appy this to a forex chart in Trading View?
BeardedQuant
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
Cycoda
Hi,
The alert code added triggers alert at anytime during the bar. How would I fix that to trigger at the end of current time frame bar?
iNtuNeFXMarkets
Just sent you a PM!
詳細