Tr0sT

Custom Screener

I was inspired by this idea:
With his script you can create a simple custom screener in Pine Script on your own for 40 tickets or less. But to make a separate screener for every 40 stocks sucks, so I wrote a program that generates script that allows you to switch stock sets.

Current script is generated for the Moscow stock exchange.

You can contact me if you need screener for your exchange or big set of stocks.
發布通知: A lot of people were asking how to add alerts to this screener, so I updated it.
Unfortunately, you can't attach a list of triggered tickers to the alerts message, but you can generate codes to understand later using another script (which decrypts them) which tickers have been triggered.
I'm not going to put an open source decrypt script, but I can do screener&decrypt script for your list of tickers (even 300+ tickers) for 40$ (and another pine script tasks as well).
發布通知: Big update!

Now you can enter the tickers in the script settings (12 available, but you can add more, up to 40). There are separate signals for long and short (modify LongSignalFunc() and ShortSignalFunc() for your indicators). Screener displays the triggered signals in its own panel, so you no longer need a separate script to decrypt the alerts.

Enjoy!
發布通知: Uncomment lines with strategy (1 line on the top and 4 on the bottom) and while creating the alert insert {{strategy.order.alert_message}} in the alert creation window in message field to receive triggered ticker's list in the alert messages.
發布通知: There is also a new alert in study, that combines long and short signal - for free TV users.
發布通知: Added alerts with triggered tickers in alert's messages
開源腳本

秉持真正的TradingView精神,該腳本的作者將其開源發佈,因此交易者可以理解和驗證它。為作者加油!您可以免費使用它,但是在發佈中重複使用此程式碼受網站規則的約束。您可以把它加入到常用以在圖表上使用它。

想在圖表上使用此腳本?

評論

So what does this screener show? That a stock has done what?
+17 回覆
Tr0sT kiero
@kiero, whatever you want. You can implement your own customFunc() and choose stocks with your own conditions.
+5 回覆
kiero Tr0sT
@Tr0sT,
I see, thank you. I need to know coding then.
回覆
@Tr0sT, this is awesome! I was just thinking of something like that and viola, you did it! Thank you so much...

This screener displays the ticker symbols that fulfil the custom condition on the last bar of the Index chart correct?

Few questions here...

1. I noticed a repetition with set of 5 or 6 ticker symbols. So to recreate for a new exchange and tickers (in a watchlist), I just need to replace the tickers appropriately correct?

2. Since MOEX is named, does this only appear when MOEX chart is observed?

3. What’s the GAZP at the end for?

4. Does this code look at end of day or real time qualification of the custom function?
回覆
Tr0sT Auguraltrader
@Auguraltrader, yes, but custom condition is not just for the last bar - you can use any complex condition - basically any custom indicators can be used in stock filtering.
1. Yes. You need to replace tickers and exchange's name. For example, i have separate watchers for binance bnb pairs, usdt pairs, moex futures...
2. No, script will have same behavior on every chart.
3. In order to work correctly with 7 sets number of tickers needs to be multiple of 7. But number of MOEX stocks is less, so i used ticker GAZP as a plug to fill voids.
4. Real time, as any other indicator. But if you will use it as an alerts provider it can be customized.
回覆
@TrOsT The code works well. I added an alert to it. However, the alert only works on the particular ticker in which the alert was set. In other words, if you set the alert when ENPL chart was on your screen, that is the only ticker in which the alert will be active. Any idea how to get a workaround so the alert works for all the tickers and not just the one?
+7 回覆
Tr0sT j_rock
@j_rock, that's strange. the alerts work no matter which ticker the script is on.
回覆
j_rock Tr0sT
@Tr0sT, have you added any specific alerts to this? I added my own parameter, of the slope of a moving average changing from negative to positive. When activating the alert through the chart, it will only work for one specific ticker. I am hoping I can get that to work.
回覆
Tr0sT j_rock
@j_rock, just updated the source code - check it out. I use this version to get alerts and it works no matter which ticker the alert was set
回覆
j_rock Tr0sT
@Tr0sT, Thanks man. I will check it out. I appreciate the work you have put in.
回覆