Update app.py
Browse files
app.py
CHANGED
|
@@ -357,11 +357,11 @@ def generate_trading_signals(df):
|
|
| 357 |
df['BB_Signal'] = np.where(df['Close'] >= df['UpperBB'], -1, df['BB_Signal'])
|
| 358 |
|
| 359 |
# Less strict Stochastic Signal - Standard overbought/oversold (20/80 instead of 10/95)
|
| 360 |
-
df['Stochastic_Signal'] = np.where((df['SlowK'] <
|
| 361 |
-
df['Stochastic_Signal'] = np.where((df['SlowK'] >
|
| 362 |
|
| 363 |
# Less strict CMF Signal - Use ±0.1 instead of ±0.4
|
| 364 |
-
df['CMF_Signal'] = np.where(df['CMF'] > 0.
|
| 365 |
|
| 366 |
# Less strict CCI Signal - Standard thresholds (±100 instead of ±220)
|
| 367 |
df['CCI_Signal'] = np.where(df['CCI'] < -100, 1, 0)
|
|
|
|
| 357 |
df['BB_Signal'] = np.where(df['Close'] >= df['UpperBB'], -1, df['BB_Signal'])
|
| 358 |
|
| 359 |
# Less strict Stochastic Signal - Standard overbought/oversold (20/80 instead of 10/95)
|
| 360 |
+
df['Stochastic_Signal'] = np.where((df['SlowK'] < 30) & (df['SlowD'] < 30), 1, 0)
|
| 361 |
+
df['Stochastic_Signal'] = np.where((df['SlowK'] > 100) & (df['SlowD'] > 100), -1, df['Stochastic_Signal'])
|
| 362 |
|
| 363 |
# Less strict CMF Signal - Use ±0.1 instead of ±0.4
|
| 364 |
+
df['CMF_Signal'] = np.where(df['CMF'] > 0.3, -1, np.where(df['CMF'] < -0.3, 1, 0))
|
| 365 |
|
| 366 |
# Less strict CCI Signal - Standard thresholds (±100 instead of ±220)
|
| 367 |
df['CCI_Signal'] = np.where(df['CCI'] < -100, 1, 0)
|