JayLacoma commited on
Commit
3be8e75
·
verified ·
1 Parent(s): ffdae89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -364,8 +364,8 @@ def generate_trading_signals(df):
364
  df['CMF_Signal'] = np.where(df['CMF'] > 0.4, -1, np.where(df['CMF'] < -0.4, 1, 0))
365
 
366
  # Ultra-strict CCI Signal - Require extreme deviations
367
- df['CCI_Signal'] = np.where(df['CCI'] < -200, 1, 0)
368
- df['CCI_Signal'] = np.where(df['CCI'] > 200, -1, df['CCI_Signal'])
369
 
370
  # Combined signal for ultra-strict confirmations
371
  df['Combined_Signal'] = df[['MACD_Signal','RSI_Signal', 'BB_Signal',
@@ -464,12 +464,12 @@ def plot_individual_signals(df, ticker):
464
 
465
 
466
  signal_colors = {
467
- 'MACD_Signal': {'buy': 'purple', 'sell': 'lightpink'}, # Light purple / Pale butter
468
- 'RSI_Signal': {'buy': 'purple', 'sell': 'lightpink'}, # Light purple / Pale butter
469
- 'BB_Signal': {'buy': 'purple', 'sell': 'lightpink'}, # Purple / Chiffon yellow
470
- 'Stochastic_Signal': {'buy': 'purple', 'sell': 'lightpink'}, # Purple / Corn silk
471
- 'CMF_Signal': {'buy': 'purple', 'sell': 'lightpink'}, # Deep purple / Lemon chiffon
472
- 'CCI_Signal': {'buy': 'purple', 'sell': 'lightpink'} # Dark purple / Soft maize
473
  }
474
 
475
 
 
364
  df['CMF_Signal'] = np.where(df['CMF'] > 0.4, -1, np.where(df['CMF'] < -0.4, 1, 0))
365
 
366
  # Ultra-strict CCI Signal - Require extreme deviations
367
+ df['CCI_Signal'] = np.where(df['CCI'] < -220, 1, 0)
368
+ df['CCI_Signal'] = np.where(df['CCI'] > 220, -1, df['CCI_Signal'])
369
 
370
  # Combined signal for ultra-strict confirmations
371
  df['Combined_Signal'] = df[['MACD_Signal','RSI_Signal', 'BB_Signal',
 
464
 
465
 
466
  signal_colors = {
467
+ 'MACD_Signal': {'buy': 'darkblue', 'sell': 'lightpink'}, # Light purple / Pale butter
468
+ 'RSI_Signal': {'buy': 'darkblue', 'sell': 'lightpink'}, # Light purple / Pale butter
469
+ 'BB_Signal': {'buy': 'darkblue', 'sell': 'lightpink'}, # Purple / Chiffon yellow
470
+ 'Stochastic_Signal': {'darkblue': 'purple', 'sell': 'lightpink'}, # Purple / Corn silk
471
+ 'CMF_Signal': {'buy': 'darkblue', 'sell': 'lightpink'}, # Deep purple / Lemon chiffon
472
+ 'CCI_Signal': {'buy': 'darkblue', 'sell': 'lightpink'} # Dark purple / Soft maize
473
  }
474
 
475