Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,10 @@ with con10:
|
|
| 20 |
with con20:
|
| 21 |
price_from = st.number_input('*_Price_from_*', min_value=float(1), max_value=float(10000), value=float(100), step=float(5),key=23)
|
| 22 |
price_to = st.number_input('*_Price_from_*', min_value=float(1), max_value=float(10000), value=float(200), step=float(5),key=2)
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
| 24 |
if st.button('*_SUBMIT_*'):
|
| 25 |
# Create a query with the required columns and conditions
|
| 26 |
df_Bulliesh = (Query().select('Exchange','name',f'close|{time}', f'volume|{time}', f'ADX-DI|{time}', f'ADX+DI|{time}').where(your_instance.crosses_below(Column(f'ADX-DI|{time}'), Column(f'ADX+DI|{time}')),Column(f'close|{time}').between(price_from, price_to)).order_by(f'volume|{time}', ascending=False).limit(5))
|
|
@@ -34,6 +37,10 @@ if st.button('*_SUBMIT_*'):
|
|
| 34 |
df_Beariesh = df_Beariesh.set_markets('india').get_scanner_data()
|
| 35 |
df_Beariesh = df_Beariesh[1]
|
| 36 |
df_Beariesh = df_Beariesh[df_Beariesh['exchange'] == 'NSE']
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
st.success('*_Bulliesh_*')
|
| 38 |
st.table(df_Bulliesh)
|
| 39 |
st.error('*_Beariesh_*')
|
|
|
|
| 20 |
with con20:
|
| 21 |
price_from = st.number_input('*_Price_from_*', min_value=float(1), max_value=float(10000), value=float(100), step=float(5),key=23)
|
| 22 |
price_to = st.number_input('*_Price_from_*', min_value=float(1), max_value=float(10000), value=float(200), step=float(5),key=2)
|
| 23 |
+
|
| 24 |
+
def create_link(url:str) -> str:
|
| 25 |
+
return f'''<a href="http://in.tradingview.com/chart/?symbol=NSE:{url}?">{url}🔗</a>'''
|
| 26 |
+
|
| 27 |
if st.button('*_SUBMIT_*'):
|
| 28 |
# Create a query with the required columns and conditions
|
| 29 |
df_Bulliesh = (Query().select('Exchange','name',f'close|{time}', f'volume|{time}', f'ADX-DI|{time}', f'ADX+DI|{time}').where(your_instance.crosses_below(Column(f'ADX-DI|{time}'), Column(f'ADX+DI|{time}')),Column(f'close|{time}').between(price_from, price_to)).order_by(f'volume|{time}', ascending=False).limit(5))
|
|
|
|
| 37 |
df_Beariesh = df_Beariesh.set_markets('india').get_scanner_data()
|
| 38 |
df_Beariesh = df_Beariesh[1]
|
| 39 |
df_Beariesh = df_Beariesh[df_Beariesh['exchange'] == 'NSE']
|
| 40 |
+
|
| 41 |
+
df_Beariesh['Link'] = [create_link(url) for url in df["ticker"]]
|
| 42 |
+
df_Bulliesh['Link'] = [create_link(url) for url in df["ticker"]]
|
| 43 |
+
|
| 44 |
st.success('*_Bulliesh_*')
|
| 45 |
st.table(df_Bulliesh)
|
| 46 |
st.error('*_Beariesh_*')
|