Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,7 @@ import plotly.graph_objs as go
|
|
| 6 |
from plotly.subplots import make_subplots
|
| 7 |
import warnings
|
| 8 |
warnings.filterwarnings("ignore")
|
|
|
|
| 9 |
|
| 10 |
# Set Streamlit page configuration
|
| 11 |
st.set_page_config(page_title="Bollinger Bands and RSI Trading Strategy", layout="wide")
|
|
@@ -36,7 +37,7 @@ with st.sidebar.expander("How to Use", expanded=False):
|
|
| 36 |
with st.sidebar.expander("Asset Settings", expanded=True):
|
| 37 |
ticker = st.text_input("Asset Symbol", value="ASML.AS", help="Indicate Asset Symbol (e.g., ASML.AS, BTC-USD)")
|
| 38 |
start_date = st.date_input("Start Date", value=pd.to_datetime("2020-01-01"), help="Select the start date for historical data.")
|
| 39 |
-
end_date = st.date_input("End Date", value=pd.to_datetime("today"), help="Select the end date for historical data.")
|
| 40 |
|
| 41 |
# Run Button in the Sidebar
|
| 42 |
run_button = st.sidebar.button("Run Strategy")
|
|
|
|
| 6 |
from plotly.subplots import make_subplots
|
| 7 |
import warnings
|
| 8 |
warnings.filterwarnings("ignore")
|
| 9 |
+
from datetime import datetime, timedelta
|
| 10 |
|
| 11 |
# Set Streamlit page configuration
|
| 12 |
st.set_page_config(page_title="Bollinger Bands and RSI Trading Strategy", layout="wide")
|
|
|
|
| 37 |
with st.sidebar.expander("Asset Settings", expanded=True):
|
| 38 |
ticker = st.text_input("Asset Symbol", value="ASML.AS", help="Indicate Asset Symbol (e.g., ASML.AS, BTC-USD)")
|
| 39 |
start_date = st.date_input("Start Date", value=pd.to_datetime("2020-01-01"), help="Select the start date for historical data.")
|
| 40 |
+
end_date = st.date_input("End Date", value=pd.to_datetime("today") + pd.DateOffset(1), help="Select the end date for historical data.")
|
| 41 |
|
| 42 |
# Run Button in the Sidebar
|
| 43 |
run_button = st.sidebar.button("Run Strategy")
|