Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -94,12 +94,15 @@ with st.sidebar.expander("Moving Average Parameters", expanded=False):
|
|
| 94 |
ma_short_period = st.number_input('Short-term Moving Average Period', min_value=1, value=20, help="Set the period for the short-term moving average.")
|
| 95 |
ma_long_period = st.number_input('Long-term Moving Average Period', min_value=1, value=50, help="Set the period for the long-term moving average.")
|
| 96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
# Candlestick patterns selection inside an expander, open by default
|
| 98 |
with st.sidebar.expander("Candlestick Patterns", expanded=True):
|
| 99 |
-
if st.sidebar.button('Run Analysis'):
|
| 100 |
-
run_analysis = True
|
| 101 |
-
else:
|
| 102 |
-
run_analysis = False
|
| 103 |
selected_patterns = {name: st.checkbox(name, value=True) for name, func in pattern_funcs}
|
| 104 |
|
| 105 |
if run_analysis:
|
|
@@ -174,10 +177,11 @@ if run_analysis:
|
|
| 174 |
else:
|
| 175 |
st.write("No data found for the given ticker and date range.")
|
| 176 |
|
|
|
|
| 177 |
hide_streamlit_style = """
|
| 178 |
<style>
|
| 179 |
#MainMenu {visibility: hidden;}
|
| 180 |
footer {visibility: hidden;}
|
| 181 |
</style>
|
| 182 |
"""
|
| 183 |
-
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
|
|
|
|
| 94 |
ma_short_period = st.number_input('Short-term Moving Average Period', min_value=1, value=20, help="Set the period for the short-term moving average.")
|
| 95 |
ma_long_period = st.number_input('Long-term Moving Average Period', min_value=1, value=50, help="Set the period for the long-term moving average.")
|
| 96 |
|
| 97 |
+
|
| 98 |
+
# Place the Run Analysis button above the candlestick pattern checkboxes
|
| 99 |
+
if st.sidebar.button('Run Analysis'):
|
| 100 |
+
run_analysis = True
|
| 101 |
+
else:
|
| 102 |
+
run_analysis = False
|
| 103 |
+
|
| 104 |
# Candlestick patterns selection inside an expander, open by default
|
| 105 |
with st.sidebar.expander("Candlestick Patterns", expanded=True):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
selected_patterns = {name: st.checkbox(name, value=True) for name, func in pattern_funcs}
|
| 107 |
|
| 108 |
if run_analysis:
|
|
|
|
| 177 |
else:
|
| 178 |
st.write("No data found for the given ticker and date range.")
|
| 179 |
|
| 180 |
+
# Hide the Streamlit style
|
| 181 |
hide_streamlit_style = """
|
| 182 |
<style>
|
| 183 |
#MainMenu {visibility: hidden;}
|
| 184 |
footer {visibility: hidden;}
|
| 185 |
</style>
|
| 186 |
"""
|
| 187 |
+
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
|