Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -215,7 +215,7 @@ def build_chart(df, label, interval, signal, sl, tp, ticker):
|
|
| 215 |
x=p.index,open=p.open,high=p.high,low=p.low,close=p.close,
|
| 216 |
name="Fiyat",
|
| 217 |
increasing_line_color="#00e676", decreasing_line_color="#ff5252",
|
| 218 |
-
increasing_fillcolor="
|
| 219 |
line_width=1,
|
| 220 |
),row=1,col=1)
|
| 221 |
|
|
@@ -233,10 +233,10 @@ def build_chart(df, label, interval, signal, sl, tp, ticker):
|
|
| 233 |
line=dict(color="#f06292",width=1.4,dash="dashdot"),opacity=0.8),row=1,col=1)
|
| 234 |
|
| 235 |
# ── SL / TP çizgileri
|
| 236 |
-
fig.add_hline(y=sl,line_dash="dash",line_color="
|
| 237 |
annotation_text=f"SL {sl:,.4f}",annotation_font_color="#ff5252",
|
| 238 |
annotation_position="right",row=1,col=1)
|
| 239 |
-
fig.add_hline(y=tp,line_dash="dash",line_color="
|
| 240 |
annotation_text=f"TP {tp:,.4f}",annotation_font_color="#00e676",
|
| 241 |
annotation_position="right",row=1,col=1)
|
| 242 |
|
|
@@ -257,11 +257,11 @@ def build_chart(df, label, interval, signal, sl, tp, ticker):
|
|
| 257 |
fig.add_trace(go.Scatter(x=p.index,y=p.rsi,name="RSI",
|
| 258 |
line=dict(color="#80cbc4",width=1.4),fill="tozeroy",
|
| 259 |
fillcolor="rgba(128,203,196,0.06)"),row=2,col=1)
|
| 260 |
-
for yv,c in [(70,"
|
| 261 |
fig.add_hline(y=yv,line_dash="dot",line_color=c,line_width=0.8,row=2,col=1)
|
| 262 |
|
| 263 |
# ── MACD histogram + çizgiler
|
| 264 |
-
clrs=["
|
| 265 |
fig.add_trace(go.Bar(x=p.index,y=p.macd_hist,name="Hist",
|
| 266 |
marker_color=clrs,showlegend=False),row=3,col=1)
|
| 267 |
fig.add_trace(go.Scatter(x=p.index,y=p.macd,name="MACD",
|
|
@@ -270,12 +270,12 @@ def build_chart(df, label, interval, signal, sl, tp, ticker):
|
|
| 270 |
line=dict(color="#ffb74d",width=1.2)),row=3,col=1)
|
| 271 |
|
| 272 |
# ── Volume
|
| 273 |
-
vcols=["
|
| 274 |
for c,o in zip(p.close,p.open)]
|
| 275 |
fig.add_trace(go.Bar(x=p.index,y=p.volume,name="Vol",
|
| 276 |
marker_color=vcols,showlegend=False),row=4,col=1)
|
| 277 |
fig.add_trace(go.Scatter(x=p.index,y=p.vol_ma,name="Vol MA",
|
| 278 |
-
line=dict(color="
|
| 279 |
|
| 280 |
# ── Son fiyat annotation
|
| 281 |
price_str=f"${lc:,.4f}"
|
|
@@ -456,13 +456,13 @@ body,.gradio-container{background:#07070d !important;}
|
|
| 456 |
footer{display:none !important;}
|
| 457 |
.gr-button.primary{
|
| 458 |
background:linear-gradient(135deg,#1565c0,#4a148c) !important;
|
| 459 |
-
border:1px solid
|
| 460 |
font-family:'Courier New',monospace !important;letter-spacing:1px !important;
|
| 461 |
transition:all .2s !important;
|
| 462 |
}
|
| 463 |
.gr-button.primary:hover{
|
| 464 |
background:linear-gradient(135deg,#1976d2,#6a1b9a) !important;
|
| 465 |
-
box-shadow:0 0 16px
|
| 466 |
}
|
| 467 |
.gr-button{
|
| 468 |
background:#0f0f1a !important;border:1px solid #1e1e3f !important;
|
|
|
|
| 215 |
x=p.index,open=p.open,high=p.high,low=p.low,close=p.close,
|
| 216 |
name="Fiyat",
|
| 217 |
increasing_line_color="#00e676", decreasing_line_color="#ff5252",
|
| 218 |
+
increasing_fillcolor="rgba(0,200,83,0.55)",decreasing_fillcolor="rgba(255,82,82,0.55)",
|
| 219 |
line_width=1,
|
| 220 |
),row=1,col=1)
|
| 221 |
|
|
|
|
| 233 |
line=dict(color="#f06292",width=1.4,dash="dashdot"),opacity=0.8),row=1,col=1)
|
| 234 |
|
| 235 |
# ── SL / TP çizgileri
|
| 236 |
+
fig.add_hline(y=sl,line_dash="dash",line_color="rgba(255,82,82,0.6)",line_width=1.2,
|
| 237 |
annotation_text=f"SL {sl:,.4f}",annotation_font_color="#ff5252",
|
| 238 |
annotation_position="right",row=1,col=1)
|
| 239 |
+
fig.add_hline(y=tp,line_dash="dash",line_color="rgba(0,230,118,0.6)",line_width=1.2,
|
| 240 |
annotation_text=f"TP {tp:,.4f}",annotation_font_color="#00e676",
|
| 241 |
annotation_position="right",row=1,col=1)
|
| 242 |
|
|
|
|
| 257 |
fig.add_trace(go.Scatter(x=p.index,y=p.rsi,name="RSI",
|
| 258 |
line=dict(color="#80cbc4",width=1.4),fill="tozeroy",
|
| 259 |
fillcolor="rgba(128,203,196,0.06)"),row=2,col=1)
|
| 260 |
+
for yv,c in [(70,"rgba(255,82,82,0.4)"),(50,"rgba(85,85,85,0.4)"),(30,"rgba(0,230,118,0.4)")]:
|
| 261 |
fig.add_hline(y=yv,line_dash="dot",line_color=c,line_width=0.8,row=2,col=1)
|
| 262 |
|
| 263 |
# ── MACD histogram + çizgiler
|
| 264 |
+
clrs=["rgba(0,200,83,0.67)" if v>=0 else "rgba(255,23,68,0.67)" for v in p.macd_hist]
|
| 265 |
fig.add_trace(go.Bar(x=p.index,y=p.macd_hist,name="Hist",
|
| 266 |
marker_color=clrs,showlegend=False),row=3,col=1)
|
| 267 |
fig.add_trace(go.Scatter(x=p.index,y=p.macd,name="MACD",
|
|
|
|
| 270 |
line=dict(color="#ffb74d",width=1.2)),row=3,col=1)
|
| 271 |
|
| 272 |
# ── Volume
|
| 273 |
+
vcols=["rgba(0,200,83,0.4)" if c>=o else "rgba(255,82,82,0.4)"
|
| 274 |
for c,o in zip(p.close,p.open)]
|
| 275 |
fig.add_trace(go.Bar(x=p.index,y=p.volume,name="Vol",
|
| 276 |
marker_color=vcols,showlegend=False),row=4,col=1)
|
| 277 |
fig.add_trace(go.Scatter(x=p.index,y=p.vol_ma,name="Vol MA",
|
| 278 |
+
line=dict(color="rgba(255,204,2,0.6)",width=1.2)),row=4,col=1)
|
| 279 |
|
| 280 |
# ── Son fiyat annotation
|
| 281 |
price_str=f"${lc:,.4f}"
|
|
|
|
| 456 |
footer{display:none !important;}
|
| 457 |
.gr-button.primary{
|
| 458 |
background:linear-gradient(135deg,#1565c0,#4a148c) !important;
|
| 459 |
+
border:1px solid rgba(66,165,245,0.4) !important;color:#fff !important;
|
| 460 |
font-family:'Courier New',monospace !important;letter-spacing:1px !important;
|
| 461 |
transition:all .2s !important;
|
| 462 |
}
|
| 463 |
.gr-button.primary:hover{
|
| 464 |
background:linear-gradient(135deg,#1976d2,#6a1b9a) !important;
|
| 465 |
+
box-shadow:0 0 16px rgba(66,165,245,0.27) !important;
|
| 466 |
}
|
| 467 |
.gr-button{
|
| 468 |
background:#0f0f1a !important;border:1px solid #1e1e3f !important;
|