Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,9 +17,13 @@ con10, con20 = st.columns(2)
|
|
| 17 |
st.success('*_Setup_*')
|
| 18 |
with con10:
|
| 19 |
st.write('')
|
| 20 |
-
|
| 21 |
if time == 'D':
|
| 22 |
time = 'close'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
with con20:
|
| 24 |
st.write('')
|
| 25 |
price_from = st.number_input('*_Price_From_*', min_value=float(1), max_value=float(10000), value=float(100), step=float(5),key=23)
|
|
@@ -30,8 +34,8 @@ def create_link(url:str) -> str:
|
|
| 30 |
|
| 31 |
if st.button('*_SUBMIT_*'):
|
| 32 |
# Create a query with the required columns and conditions
|
| 33 |
-
df_Bulliesh = (Query().select('Exchange','name',
|
| 34 |
-
df_Beariesh = (Query().select('Exchange','name',
|
| 35 |
|
| 36 |
# Display the result
|
| 37 |
df_Bulliesh = df_Bulliesh.set_markets('india').get_scanner_data()
|
|
|
|
| 17 |
st.success('*_Setup_*')
|
| 18 |
with con10:
|
| 19 |
st.write('')
|
| 20 |
+
time1 = st.selectbox('*_Time Frame_*', ('1','5','15','30','60','120','240','D','1W','1M'),key=1)
|
| 21 |
if time == 'D':
|
| 22 |
time = 'close'
|
| 23 |
+
timeclose = 'close'
|
| 24 |
+
else:
|
| 25 |
+
timeclose = f'close|{time1}'
|
| 26 |
+
time = time1
|
| 27 |
with con20:
|
| 28 |
st.write('')
|
| 29 |
price_from = st.number_input('*_Price_From_*', min_value=float(1), max_value=float(10000), value=float(100), step=float(5),key=23)
|
|
|
|
| 34 |
|
| 35 |
if st.button('*_SUBMIT_*'):
|
| 36 |
# Create a query with the required columns and conditions
|
| 37 |
+
df_Bulliesh = (Query().select('Exchange','name',timeclose, 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))
|
| 38 |
+
df_Beariesh = (Query().select('Exchange','name',timeclose, f'volume|{time}', f'ADX-DI|{time}', f'ADX+DI|{time}').where(your_instance.crosses_above(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))
|
| 39 |
|
| 40 |
# Display the result
|
| 41 |
df_Bulliesh = df_Bulliesh.set_markets('india').get_scanner_data()
|