tosin2013 commited on
Commit
33bf082
·
verified ·
1 Parent(s): cf60193

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -174,9 +174,11 @@ def calculate_take_profit(target_price, fibonacci_levels, buy_signal):
174
  # Calculate take profit based on Fibonacci levels and target price
175
  if buy_signal:
176
  closest_levels = {k: v for k, v in fibonacci_levels.items() if v > target_price}
 
177
  take_profit_fibonacci_level = max(closest_levels.keys())
178
  else:
179
  closest_levels = {k: v for k, v in fibonacci_levels.items() if v < target_price}
 
180
  take_profit_fibonacci_level = min(closest_levels.keys())
181
 
182
  take_profit = closest_levels[take_profit_fibonacci_level]
 
174
  # Calculate take profit based on Fibonacci levels and target price
175
  if buy_signal:
176
  closest_levels = {k: v for k, v in fibonacci_levels.items() if v > target_price}
177
+ print(closest_levels)
178
  take_profit_fibonacci_level = max(closest_levels.keys())
179
  else:
180
  closest_levels = {k: v for k, v in fibonacci_levels.items() if v < target_price}
181
+ print(closest_levels)
182
  take_profit_fibonacci_level = min(closest_levels.keys())
183
 
184
  take_profit = closest_levels[take_profit_fibonacci_level]