Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -150,7 +150,7 @@ if st.sidebar.button('Run Analysis'):
|
|
| 150 |
xaxis_title='Date',
|
| 151 |
yaxis_title='Price',
|
| 152 |
legend_title='Legend')
|
| 153 |
-
st.plotly_chart(fig1)
|
| 154 |
|
| 155 |
# Plot Support and Resistance Levels using Rolling Midpoint Range
|
| 156 |
st.write("### Rolling Midpoint Range")
|
|
@@ -171,7 +171,7 @@ if st.sidebar.button('Run Analysis'):
|
|
| 171 |
xaxis_title='Date',
|
| 172 |
yaxis_title='Price',
|
| 173 |
legend_title='Legend')
|
| 174 |
-
st.plotly_chart(fig2)
|
| 175 |
|
| 176 |
# Plot Swing Highs and Lows
|
| 177 |
st.write("### Swing Highs and Lows")
|
|
@@ -189,7 +189,7 @@ if st.sidebar.button('Run Analysis'):
|
|
| 189 |
xaxis_title='Date',
|
| 190 |
yaxis_title='Price',
|
| 191 |
legend_title='Legend')
|
| 192 |
-
st.plotly_chart(fig3)
|
| 193 |
|
| 194 |
# Plot Fibonacci Retracement Levels
|
| 195 |
st.write("### Fibonacci Retracement Levels")
|
|
@@ -207,7 +207,7 @@ if st.sidebar.button('Run Analysis'):
|
|
| 207 |
xaxis_title='Date',
|
| 208 |
yaxis_title='Price',
|
| 209 |
legend_title='Legend')
|
| 210 |
-
st.plotly_chart(fig4)
|
| 211 |
|
| 212 |
# Plot Trendlines
|
| 213 |
st.write("### Trendlines with Regression Analysis")
|
|
@@ -238,7 +238,7 @@ if st.sidebar.button('Run Analysis'):
|
|
| 238 |
xaxis_title='Date',
|
| 239 |
yaxis_title='Price',
|
| 240 |
legend_title='Legend')
|
| 241 |
-
st.plotly_chart(fig5)
|
| 242 |
|
| 243 |
# Plot Volume Profile
|
| 244 |
st.write("### Volume Profile")
|
|
@@ -270,7 +270,7 @@ if st.sidebar.button('Run Analysis'):
|
|
| 270 |
ax1.set_title(f'{ticker} Price Data')
|
| 271 |
ax2.barh(price_bins[:-1], volume_profile, height=(price_bins[1] - price_bins[0]), color='blue', edgecolor='none')
|
| 272 |
ax2.set_title('Volume Profile')
|
| 273 |
-
st.pyplot(fig6)
|
| 274 |
|
| 275 |
# Plot KMeans Clusters
|
| 276 |
st.write("### KMeans Clusters")
|
|
@@ -290,7 +290,7 @@ if st.sidebar.button('Run Analysis'):
|
|
| 290 |
xaxis_title='Date',
|
| 291 |
yaxis_title='Price',
|
| 292 |
legend_title='Legend')
|
| 293 |
-
st.plotly_chart(fig7)
|
| 294 |
|
| 295 |
else:
|
| 296 |
st.write("No data found for the given ticker and date range.")
|
|
|
|
| 150 |
xaxis_title='Date',
|
| 151 |
yaxis_title='Price',
|
| 152 |
legend_title='Legend')
|
| 153 |
+
st.plotly_chart(fig1, use_container_width=True)
|
| 154 |
|
| 155 |
# Plot Support and Resistance Levels using Rolling Midpoint Range
|
| 156 |
st.write("### Rolling Midpoint Range")
|
|
|
|
| 171 |
xaxis_title='Date',
|
| 172 |
yaxis_title='Price',
|
| 173 |
legend_title='Legend')
|
| 174 |
+
st.plotly_chart(fig2, use_container_width=True)
|
| 175 |
|
| 176 |
# Plot Swing Highs and Lows
|
| 177 |
st.write("### Swing Highs and Lows")
|
|
|
|
| 189 |
xaxis_title='Date',
|
| 190 |
yaxis_title='Price',
|
| 191 |
legend_title='Legend')
|
| 192 |
+
st.plotly_chart(fig3, use_container_width=True)
|
| 193 |
|
| 194 |
# Plot Fibonacci Retracement Levels
|
| 195 |
st.write("### Fibonacci Retracement Levels")
|
|
|
|
| 207 |
xaxis_title='Date',
|
| 208 |
yaxis_title='Price',
|
| 209 |
legend_title='Legend')
|
| 210 |
+
st.plotly_chart(fig4, use_container_width=True)
|
| 211 |
|
| 212 |
# Plot Trendlines
|
| 213 |
st.write("### Trendlines with Regression Analysis")
|
|
|
|
| 238 |
xaxis_title='Date',
|
| 239 |
yaxis_title='Price',
|
| 240 |
legend_title='Legend')
|
| 241 |
+
st.plotly_chart(fig5, use_container_width=True)
|
| 242 |
|
| 243 |
# Plot Volume Profile
|
| 244 |
st.write("### Volume Profile")
|
|
|
|
| 270 |
ax1.set_title(f'{ticker} Price Data')
|
| 271 |
ax2.barh(price_bins[:-1], volume_profile, height=(price_bins[1] - price_bins[0]), color='blue', edgecolor='none')
|
| 272 |
ax2.set_title('Volume Profile')
|
| 273 |
+
st.pyplot(fig6, use_container_width=True)
|
| 274 |
|
| 275 |
# Plot KMeans Clusters
|
| 276 |
st.write("### KMeans Clusters")
|
|
|
|
| 290 |
xaxis_title='Date',
|
| 291 |
yaxis_title='Price',
|
| 292 |
legend_title='Legend')
|
| 293 |
+
st.plotly_chart(fig7, use_container_width=True)
|
| 294 |
|
| 295 |
else:
|
| 296 |
st.write("No data found for the given ticker and date range.")
|