TradingView
dg_factor
29. Jul. 2023 05:08

Any Screener (Multiple) 

Bitcoin / TetherUSBinance

Beschreibung

I suppose it's time to publish something relatively useful :). Here's the first try, Any Screener.

This script is an advanced version of the Alphatrend - Screener that I've coded as a humble "thank you" to Kıvanç Özbilgiç (KivancOzbilgic), who always inspired me.

INTRODUCTION
I developed this version with a unique method because I couldn't find an example with the following features:
  • It presents the valid signal status of multiple indicators for 15 different symbols in the form of a report.
  • It indicates how many bars have passed after the signal has occurred.
  • It indicates the signal direction with dynamic colors and chars.
  • It can also be used for data (just indicator value) that is only intended to be displayed as text. (Default color is grey).
  • Long and short signals can optionally be ploted on the chart.
  • It includes advanced configuration settings.


USAGE OF PANEL
The screener panel is simple to use. On the far left, assets are listed. The names of the indicators appear at the top. In the column with the name of each indicator, the signals of that indicator appear as green or red. The green ones represent the long signals (uptrend) and the red ones represent the short signals (down trend). The numbers in square brackets indicate how many bars have passed after the last signal has occurred. (For example: According to the indicator at the top, when the green bullish triangle and 21 appeared on allign of BTCUSDT, Bitcoin switched to buy signal 21 bars ago. A tip : If the signal distance is 0, the signal occurred at the current bar. It is recommended to wait for the bar to close before entering the trade). Signal distance is an essential output for both manual and algorithmic trading. Users often require mentioned data the most during real time trading.

THE SCRIPT
There are two sections in the script; indicators and screener.

SECTION 1 : "INDICATORS"
In the indicator section, you'll find efficient details about switch methods, normalization, avoid pyramyding (in momentum oscillators) etc. On the other hand, I intended to present a "how to example" of a multiple screener, so it has to include more than one indicator.

OTT : Optimized Trend Tracker is developed by dear Anıl Özekşi, known as the "Old Fisherman" :). In my opinion, it is a pretty cool trend-following indicator that offers a mathematical elegance. This indicator aim to detect the current market trend direction, the indicator detect an up-trending market when the support line is superior to the OTT, and a down trending market when the support line is inferior to the OTT. It has three parameters; moving average type, length and percentage. In this version when the percentage parameter is set to 0.0, OTT turns into the selected moving average. And the signals are generated by the crossing of the closing price. It means, this screener is able to compile and present status of moving averages as well. Also VAR (VIDYA) and EVWMA has been re-designed, both moving averages no longer start at zero at the beginning of the chart (That was a big problem for backtests).

PSAR : J. Welles Wilder's Parabolic Stop And Reversal is an important trend following indicator. PSAR detects an up-trending market when below the market price and a down-trend when above. It can work in harmony with OTT according to the parameter combinations.

OSCILLATORS : Also optional three momentum oscillators have been added. MFI (Money Flow Index), RSI (Relative Strength Index) and STOCH (Stochastic %k). All three oscillators are widely used in markets and quite successful in explaining price movements by using different sources. Oscillators generate long and short signals based on oversold and overbought parameters.

VOLATILITY & TREND : There are three optional indicators. ADX (Average Directional Index), BBW-N (Normalized Bollinger Bandwidth) and REG-N (Normalized value of standard error of linear regression). These three indicators don't generate any long or short signals. Instead, they are used to measure the strength of trends and volatility. Therefore, only the numerical results (0-100) are displayed in screener panel and it is grey. (Note : The second length parameter of ADX has the same value with the first one. Bollinger Bandwith's multiplier is 2.0. REG-N is a variable that developed by Paul Kirshenbaum for Kirshenbaum Bands.)

SECTION 2 : "SCREENER"
The second section processes the main idea. This Screener model is based on generating an integer direction variable from boolean signals. The direction value serves multiple purposes: calculating the distance of signal, determining the color based on the direction, and creating "clean" data for the security function. The final step is to present the obtained data as text to the user.

HOW CAN I "SCREEN" MY CONDITIONS?
That's piece a cake, delete the Section 1 in the script :). If you change totally 11 variables according to your own strategy, you can create your new screener! The method is explained at lines 169-171.

SINCERELY THANKS
To allanster for patiently answering my primitive questions,
And to KivancOzbilgic for mind blowing suggestions (especially while we're drinking Raki) :)...

DISCLEIMER
This is just an indicator, nothing more. The script is for informational and educational purposes only. The use of the script does not constitute professional and/or financial advice. The responsibility for risks associated with the use of the script is solely owned by the user. Do not forget to manage your risk. And trade as safely as possible. Good luck!

Versionshinweise

The warning bugs caused by boolean variables have been fixed.
Tooltips have been updated.
Default OTT parameters have been revised (Length & Percent).
Default Oscillator type parameter has been revised.
Plot options have been added.
(Yes, you can rescale and display oscillators by simple three parameters)

Versionshinweise

This update does not change old calculations. It is intended to make the indicator more understandable for users.
✔ The tooltips are updated.
✔ Pyramiding option and the signals of Oscillator are revised.
✔ The f_data() function is revised.
✔ The Symbols are updated.

PLEASE NOTE THAT;
When 'Plot' or 'Show Signal' options are activated, the drawing wil be made for the symbol currently loaded on the chart. On the other hand, the data in the Screener Panel is calculated for the symbols defined within the indicator settings. If you observe differences between the values in the drawing and in the panel, please check which symbol is loaded on your chart.

ÖNEMLİ NOT:
'Plot' veya 'Show Signal' seçeneklerini aktive ettiğinizde yapılan çizim, grafiğinizde halihazırda açık olan sembol için geçerlidir. Tarayıcı panelinde gördüğünüz veriler ise indikatör ayarlarında tanımladığınız semboller için hesaplanır. Çizim ile paneldeki değerler arasında farklılık gözlemlerseniz, grafiğinizde hangi sembolün açık olduğunu kontrol ediniz. Lütfen sorularınızı bu kontrolü gerçekleştirdikten sonra sorunuz :)
Kommentare
vetcem5138
Emeğinizi paylaştığımız için teşekkürler. Diğer yorumlarda da benzer durum var gibi anladım. Örneğin herhangi bir hissede 4Slik periyotta OTT indikatörünü tek başına baktığınızda "SELL" sinyali varken bu screenerda "BUY" sinayli (yeşil renk oluşuyor) kontrol edebilir misiniz?
dg_factor
@vetcem5138, Kullanıcılar maalesef indikatörlerin temel parametrelerini ayarlamakta güçlük çekebiliyor, yorumlar biraz bununla ilgili. Tekrar tekrar kontrol ettim, sözünü ettiğiniz türde herhangi bir hata ya da yanlışlık gözlemleyemedim. Tarayıcının hatalı sonuç ürettiğini düşündüğünüz sembol, timeframe ve bar/saat bilgisini (mümkünse görsel olarak) iletebilirseniz çözüm üretelim.
H-A-Y-R-U-L-L-A-H
mrb hocam rsı ile macd sinyal gösteriyormu indikatör
dg_factor
@H-A-Y-R-U-L-L-A-H, Osilatör seçenekleri içinde RSI, MFI ve Stochastic indikatörlerini seçebilirsiniz. Komutta MACD bulunmaz.
zschonn
It doesn't show correct MFI index
dg_factor
@zschonn, Please check the reference levels in the settings.

Default Levels
Long Signal: When the oscillator value is above the oversold level (30).
Short Signal: When the oscillator value is below the overbought level (70).

(The common use of MFI levels are 20 and 80.)

Note that;
If you activate "Avoid Pyramiding" option, it allows you to hide consecutive signals in the same direction. If you deactivate it, you can display repeating signals.
zschonn
@dg_factor, Many thanks for the quick response. it shows index 109 of 14 days (i did nothing change in setting) If I check avoid pyramiding or not, whereas real MFI stands on 55.78 index.
Despite of this discrepancy, no doubt you have done wonderful job! Best wishes
dg_factor
@zschonn, Thanks. If you could provide chart info (symbol and time frame), I will check and try to make a more detailed explanation.
mur76yil
rsi değeri neye göre değer alıyor dogru deger göstermiyor
dg_factor
@mur76yil, Herhangi bir hata ya da yanlışlık yok. Ayarlar kısmında seçtiğiniz osilatör (RSI), belirlediğiniz "Over Sold" seviyesini (30) yukarıya doğru kırdığında Long sinyali,"Over Bought" seviyesini (70) aşağıya doğru kırdığında Short sinyali üretilir.
Mehr