Creating Simple Custom Screener in PineScript (TradingView)

preview_player
Показать описание


Quite often I need to run screeners with the custom condition, but unfortunately, in TradingView it's impossible.
I created an example script to show how you can create a simple custom screener in Pine Script on your own.
It's not very good, it requires some manual adjustments, it can be improved in some ways, but I think it might work for some tasks.
What do you think? Do you have a better way to implement custom screeners in TradingView?

Here is the link to the code I showed in the video:
Рекомендации по теме
Комментарии
Автор

is there a way to apply the function to all tickers instead of manually list one by one? Any function to grab a full stock list?

MrEugeneleo
Автор

Great stuff. Could you please make a 2nd part for a more complex example? It would be very useful. Thanks for sharing!

aaronsarinana
Автор

Is it accurate that there are no script-customizable scanners available that scan intraday? it is seems like service providers are not allowed to provide this function.

carleynorthcoast
Автор

so pinescript does have loops it has if then which can be used recursively and a for loop function

pineapple
Автор

hi
may i know is it possible to code the price dropped more than 20 cents?

vincentkhoo
Автор

Thank You Very much for your video it helped me to built my screener but i have one issue, screener notifies when line is crossed but it should show when candle is closed above line i used
buy =(close, line)
buy not working can you help

denishpatels
Автор

Unfortunately I tried screenner with a moderately complex indicator and it simply fails to function/compiler but works with very simple commands. Any ideas?

donotfret
Автор

is this still actual? I mean this very complicated method that I have to write all of my symbols in the editor? Normally it would make sense, that I first choose the symbols in the screener, The I start my code, and when my code got triggerd the symbol gets highlighted or so.

Normirga
Автор

HI,
I AM LOOKING FOR A SOLUTION FOR THIS CODE

request.security(syminfo.tickerid, timeframe.period, close)

request.security('STOCKNAME', timeframe.period, close)

BOTH RETURN DIFFERENT DATA

ssrajpal
Автор

Based on the idea i your vidio I am at the moment in the process programming my own screener. Do you know if there is a "work around" that would allow one to use a watchlist instead of having to input list of shares?

peteriversen
Автор

Dear, do you know if it is possible to use different time frames? I think it´s not possible due to security only allow to use one time frame resolution. What do you think?

maximilianoolazabal
Автор

Can alerts be triggered if a condition is met? I have 1 pattern to be applied on 10 time frames. 4 symbols. Just need to be alerted. Afterwards, I just verify on each symbol.

nguyenak
Автор

Sir, I want to code for a candlestick color i.e. if candle's real body is less than 50% of entire range/body of candle then that candle's color should be blue
Plz help me to do it.

onkarshinde
Автор

Does it will be fast enough for free version because the screener in trading view is not real time data for free account.

cristiano
Автор

haha. i thought there could be better way. thanks for confmation.

deva
Автор

hi can you please tell me can I use an indicator either builtin or custom in the custom function

himanshurunthala
Автор

Is it possible to make a screener for us stocks? would I have to add all stocks in the screener? Is it possible to search in all stocks for a criteria?

mytube
Автор

Now Im struggling to make it work for a:
RSI 51
if above 70 true
or
if below 30 true

I cannot make it work :c

kjzsbtby
Автор

Hi, this code is not working for me, if anyone can help me with the right code and rectify my mistake....I am very new in pine script

.. study("Custom Screener", overlay = false)

customFunc() => open>close

s1=security(‘NIFTY’, ‘D’, customFunc())
s2=security(‘BANKNIFTY’, ‘D’, customFunc())
s3=security(‘JINDALSTEL’, ‘D’, customFunc())
s4=security(‘MOTHERSUMI’, ‘D’, customFunc())
s5=security(‘SBIN’, ‘D’, customFunc())
s6=security(‘HDFCBANK’, ‘D’, customFunc())
s7=security(‘HDFC’, ‘D’, customFunc())
s8=security(‘ICICIBANK’, ‘D’, customFunc())
s9=security(‘RELIANCE’, ‘D’, customFunc())
s10=security(‘UBL’, ‘D’, customFunc())

scr_label = ‘Screener:

scr_label := s1 ? scr_label + ‘NIFTY\n’ : scr_label
scr_label := s2 ? scr_label + ‘BANKNIFTY \n’ : scr_label
scr_label := s3 ? scr_label + ‘JINDALSTEL \n’ : scr_label
scr_label := s4 ? scr_label + ‘MOTHERSUMI \n’ : scr_label
scr_label := s5 ? scr_label + ‘SBIN \n’ : scr_label
scr_label := s6 ? scr_label + ‘HDFCBANK \n’ : scr_label
scr_label := s7 ? scr_label + ‘HDFC \n’ : scr_label
scr_label := s8 ? scr_label + ‘ICICIBANK \n’ : scr_label
scr_label := s9 ? scr_label + ‘RELIANCE \n’ : scr_label
scr_label := s10 ? scr_label + ‘UBL\n’ : scr_label

lab_l = label.new(
bar_index, 0, scr_label,
color=color.lime, textcolor=color.black, style=lable.style_labeldown, yloc=yloc.price)
label.delete(lab_l[1])
plot(0, transp=90)

stockshow
Автор

Great! I cant believe how TV doesnt has a pro screener. Current sucks too basic dont usefull if you are trading with serious strategies. I will learn pin script first. I coming from quantopian with basic python skills. For me Amibroker the best.

ramongonzalez