-
Notifications
You must be signed in to change notification settings - Fork 1
/
000-en_iyi_10_tarama_günlük.py
254 lines (231 loc) · 9.23 KB
/
000-en_iyi_10_tarama_günlük.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# -*- coding: utf-8 -*-
"""999_En_iyi_10_Tarama_Günlük.ipynb
Automatically generated by Colab.
Original file is located at
https://colab.research.google.com/drive/1FV1Bd4_lnjRswtsHjzuXSgsb6XuPt1KF
"""
#!pip install git+https://github.com/rongardF/tvdatafeed backtesting tradingview_screener telepot
import pandas as pd
from tradingview_screener import Query, Column
def Tarama_1():
"""Bu Tarama Günlük Periyotta
Açılış Fiyatı Güncel Fiyatın Altında
RSI 30 ila 40 arasında
MACD Yukarı keser MACD Sinyal
MACD Sinyal < 0
Taramasıdır.
#RSI 30 seviyesinin üzerinde al verirken Macd 0 'ın altında al veren #bist hisselerinin taraması
"""
Tarama = (Query().set_markets('turkey')
.select('name', 'change','close','volume','Perf.W')
.where(
Column('RSI').between(30,40),
Column('change').between(0,9.5),
Column('MACD.macd').crosses_above(Column('MACD.signal')),
Column('MACD.signal') < 0
)
.get_scanner_data())[1]
return Tarama
def Tarama_2():
"""Bu Tarama Günlük Periyotta
Haftalık Performansı < 15%
Göreceli Hacim > 1.5
Üstel Haraketli Ortalama 5 < Fiyat
Üstel Haraketli Ortalama 20 < Üstel Haraketli Ortalama 5
Üstel Haraketli Ortalama 50 < Üstel Haraketli Ortalama 20
MACD > MACD Sinyal
Parabolik SAR Aşağı Keser Fiyat
Emtia Kanal Endeksi >=90
Taramasıdır.
#Alternatif Düşeni kıran #bist hisselerinin taraması olarak da bilinir.
"""
Tarama = (Query().set_markets('turkey')
.select('name', 'change','close','volume','Perf.W')
.where(
Column('Perf.W') < 15,
Column('relative_volume_10d_calc') > 1.5,
Column('change') < 9.5,
Column('EMA5') < Column('close'),
Column('EMA20') < Column('EMA5'),
Column('EMA50') < Column('EMA20'),
Column('MACD.macd') > Column('MACD.signal'),
Column('P.SAR').crosses_below(Column('close')),
Column('CCI20') >= 90.0
)
.get_scanner_data())[1]
return Tarama
def Tarama_3():
"""Bu Tarama Günlük Periyotta
Haftalık Performansı < 15%
Göreceli Hacim > 1.0
Fiyat >= Basit Haraketli Ortalama 5
Basit Haraketli Ortalama 10 > Basit Haraketli Ortalama20
Macd Yukarı Keser MACD Sinyali
Taramasıdır.
#Swint Trade 2 nolu stratejisine uyan #bist hisselerinin taraması olarakda bilinir.
"""
Tarama = (Query().set_markets('turkey')
.select('name', 'change','close','volume','Perf.W')
.where(
Column('Perf.W') < 15.0,
Column('change') < 9.5,
Column('relative_volume_10d_calc')>1.0,
Column('close') >= Column('SMA5'),
Column('SMA10') >Column('SMA20'),
Column('MACD.macd').crosses_above(Column('MACD.signal'))
)
.get_scanner_data())[1]
return Tarama
def Tarama_4():
"""Bu Tarama Günlük Periyotta
Haftalık Performansı < 15%
Göreceli Hacim > 1.0
Macd Yukarı Keser Macd Sinyal
Stokastik RSI Hızlı Yukarı keser Stokastik RSI Yavaş
Taramasıdır.
#Macd ve Stokastik RSI hanüz al vermiş olan #bist hisselerinin taraması olarak da bilinir.
"""
Tarama = (Query().set_markets('turkey')
.select('name', 'change','close','volume','Perf.W')
.where(
Column('Perf.W') < 15.0,
Column('change') < 9.5,
Column('relative_volume_10d_calc')>1.0,
Column('MACD.macd').crosses_above(Column('MACD.signal')),
Column('Stoch.RSI.K').crosses_above(Column('Stoch.RSI.D'))
)
.get_scanner_data())[1]
return Tarama
def Tarama_5():
"""Bu Tarama Günlük Periyotta
Fiyat Yukarı Keser Hull Haraketl Ortalama
Ortalama Gerçek Aralık 0 ila 10 arasında
Basit Haraketli Ortalama Aşağı Keser Fiyat
Taramasıdır.
#Richards Dennis Kaplumbağası hull9 a göre oalrak da bilinir.
"""
Tarama = (Query().set_markets('turkey')
.select('name', 'change','close','volume','Perf.W')
.where(
Column('close').crosses_above('HullMA9'),
Column('change') < 9.5,
Column('ATR').between(0,10),
Column('SMA20').crosses_below('close'),
)
.get_scanner_data())[1]
return Tarama
def Tarama_6():
"""Bu Tarama Günlük Periyotta
RSI14 > 55
Üstel Hareketli Ortalama 5 < Kapanış Fiyatı
Üstel Hareketli Ortalama 20 < Basit Hareketli Ortalama 5
Üstel Hareketli Ortalama 50 < Basit Hareketli Ortalama 20
Emtia Kanal Endeksi CCI(20) Yukarı Keser 100
Hacim x Fiyat > 10 Milyon
Taramasıdır.
"""
Tarama = (Query().set_markets('turkey')
.select('name', 'change','close','volume','Perf.W')
.where(
Column('RSI') > 55.0,
Column('change') < 9.5,
Column('EMA5') < Column('close'),
Column('EMA20') < Column('SMA5'),
Column('EMA50') < Column('SMA20'),
Column('CCI20').crosses_above(100),
Column('Value.Traded') > 1E7
)
.get_scanner_data())[1]
return Tarama
def Tarama_7():
"""
ADX+CCI Taraması by Anka_Analiz
"""
Tarama = (Query().set_markets('turkey')
.select('name', 'change','close','volume','Perf.W',)
.where(
Column('Perf.W') < 10,
Column('change') < 9.5,
Column('ADX') > 20,
Column('CCI20').crosses_above(100),
Column('relative_volume_10d_calc')>1.5,
)
.get_scanner_data())[1]
return Tarama
def Tarama_8():
"""
MACD + Stokastik RSI Kesişimi by Anka_Analiz
"""
Tarama = (Query().set_markets('turkey')
.select('name', 'change','close','volume','Perf.W')
.where(
Column('Perf.W') < 10.0,
Column('change') < 9.5,
Column('relative_volume_10d_calc')>1.3,
Column('MACD.macd').crosses_above(Column('MACD.signal')),
Column('Stoch.RSI.K').crosses_above(Column('Stoch.RSI.D'))
)
.get_scanner_data())[1]
return Tarama
def Tarama_9():
"""
MACD 0 yukarı kesenler by Anka_Analiz
"""
Tarama = (Query().set_markets('turkey')
.select('name', 'change','close','volume','Perf.W')
.where(
Column('Perf.W') < 10.0,
Column('change') < 9.5,
Column('relative_volume_10d_calc')>1.5,
Column('MACD.macd').crosses_above(0),
Column('MACD.macd') > (Column('MACD.signal')),
)
.get_scanner_data())[1]
return Tarama
def Tarama_10():
"""
Düşeni Kıran by Anka_Analiz
"""
Tarama = (Query().set_markets('turkey')
.select('name', 'change','close','volume','Perf.W')
.where(
Column('Perf.W') < 10,
Column('change') <9.5,
Column('relative_volume_10d_calc')>1.0,
Column('EMA5') < Column('close'),
Column('EMA20') < Column('EMA5'),
Column('MACD.macd') > Column('MACD.signal'),
Column('P.SAR').crosses_below(Column('close')),
Column('CCI20') >= 90,
)
.get_scanner_data())[1]
return Tarama
Tarama1 = Tarama_1()
Tarama2 = Tarama_2()
Tarama3 = Tarama_3()
Tarama4 = Tarama_4()
Tarama5 = Tarama_5()
Tarama6 = Tarama_6()
Tarama7 = Tarama_7()
Tarama8 = Tarama_8()
Tarama9 = Tarama_9()
Tarama10 = Tarama_10()
tarama_dict = {
'Tarama 1': Tarama1, 'Tarama 2': Tarama2, 'Tarama 3': Tarama3, 'Tarama 4': Tarama4, 'Tarama 5': Tarama5, 'Tarama 6': Tarama6,
'Tarama 7': Tarama7, 'Tarama 8': Tarama8, 'Tarama 9': Tarama9, 'Tarama 10': Tarama10}
for name, df in tarama_dict.items():
df['Taramalar'] = name
tarama_list = [
Tarama1, Tarama2, Tarama3, Tarama4, Tarama5, Tarama6, Tarama7, Tarama8,
Tarama9, Tarama10]
combined_df = pd.concat(tarama_list, ignore_index=True)
print(combined_df.to_string())
combined_df = combined_df.groupby(['ticker', 'name', 'change', 'close', 'volume', 'Perf.W'], as_index=False).agg({'Taramalar': ','.join})
combined_df['close'] = round(combined_df['close'] ,2)
combined_df['Perf.W'] = round(combined_df['Perf.W'] ,2)
source_counts = combined_df['Taramalar'].value_counts()
combined_df['Tarama Sayısı'] = combined_df['Taramalar'].str.count('Tarama')
combined_df['Taramalar'] = combined_df['Taramalar'].str.replace('Tarama', 'T')
combined_df['change'] = round(combined_df['change'] ,2)
combined_df_2 = combined_df.sort_values(by='Tarama Sayısı', ascending=False).reset_index(drop=True)
print(combined_df_2.to_string())