jeeva780 commited on
Commit
3cba3de
·
verified ·
1 Parent(s): 5eb07f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -19,11 +19,15 @@ 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 time1 == '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,8 +38,8 @@ def create_link(url:str) -> str:
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()
 
19
  st.write('')
20
  time1 = st.selectbox('*_Time Frame_*', ('1','5','15','30','60','120','240','D','1W','1M'),key=1)
21
  if time1 == 'D':
22
+ timevolume = 'volume'
23
+ timeADX-DI = 'ADX-DI'
24
+ timeADX+DI = 'ADX+DI'
25
  timeclose = 'close'
26
  else:
27
  timeclose = f'close|{time1}'
28
+ timevolume = f'volume|{time}'
29
+ timeADX-DI = f'ADX-DI|{time}'
30
+ timeADX+DI = f'ADX+DI|{time}'
31
  with con20:
32
  st.write('')
33
  price_from = st.number_input('*_Price_From_*', min_value=float(1), max_value=float(10000), value=float(100), step=float(5),key=23)
 
38
 
39
  if st.button('*_SUBMIT_*'):
40
  # Create a query with the required columns and conditions
41
+ df_Bulliesh = (Query().select('Exchange','name',timeclose, timevolume, timeADX-DI, timeADX+DI).where(your_instance.crosses_below(Column(timeADX-DI), Column(timeADX+DI)),Column(timeclose).between(price_from, price_to)).order_by(timevolume, ascending=False).limit(5))
42
+ df_Beariesh = (Query().select('Exchange','name',timeclose, timevolume, timeADX-DI, timeADX+DI).where(your_instance.crosses_above(Column(timeADX-DI), Column(timeADX+DI)),Column(timeclose).between(price_from, price_to)).order_by(timevolume, ascending=False).limit(5))
43
 
44
  # Display the result
45
  df_Bulliesh = df_Bulliesh.set_markets('india').get_scanner_data()