arash7920 commited on
Commit
d0dd88a
·
1 Parent(s): f8bb882

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +35 -0
app.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from tabs.plot_by_columns import plot_by_columns
2
+ from tabs.volume_profile import volume_profile
3
+ from datetime import time
4
+ import streamlit as st
5
+
6
+
7
+ st.markdown('# Plotting Dashboard')
8
+
9
+ st.sidebar.title("Meta Parameters")
10
+ st.sidebar.caption("Choose Meta Parameters here.")
11
+
12
+ ticker_name = st.sidebar.text_input('Enter the ticker name')
13
+ given_date = st.sidebar.text_input('Enter the date')
14
+ strategy_timeframe = st.sidebar.text_input('Enter the strategy timeframe')
15
+ vp_timeframe = st.sidebar.text_input('Enter the volume profile timeframe')
16
+
17
+ by_columns_tab, strategy_tab, volume_profile_tab = st.tabs(["plot columns by each other", "plot strategy",
18
+ "volume profile"])
19
+
20
+ with by_columns_tab:
21
+ if ticker_name != '' and given_date != '' and strategy_timeframe != '':
22
+ plot_by_columns(ticker=ticker_name, date=given_date, timeframe=strategy_timeframe, session=st)
23
+ else:
24
+ st.markdown('### No Dataframe to Show Yet!')
25
+
26
+ with volume_profile_tab:
27
+ st.markdown('#### Interval of Volume Profile')
28
+ vp_interval = st.slider("Choose the interval of volume Profile", value=(time(12, 45), time(16, 0)))
29
+
30
+ if ticker_name != '' and given_date != '' and strategy_timeframe != '' and vp_timeframe != '':
31
+ volume_profile(ticker=ticker_name, date=given_date, strategy_timeframe=strategy_timeframe,
32
+ volume_profile_timeframe=vp_timeframe, interval=vp_interval, session=st)
33
+
34
+ else:
35
+ st.markdown('### No Dataframe to Show Yet!')