Riy777 commited on
Commit
5264c00
·
verified ·
1 Parent(s): 1f9b1a1

Update ml_engine/titan_engine.py

Browse files
Files changed (1) hide show
  1. ml_engine/titan_engine.py +11 -0
ml_engine/titan_engine.py CHANGED
@@ -141,6 +141,17 @@ class TitanEngine:
141
 
142
  if df.empty: continue
143
 
 
 
 
 
 
 
 
 
 
 
 
144
  # تطبيق المؤشرات حسب الإطار
145
  df = self.apply_inverted_pyramid(df, tf)
146
  processed_tfs[tf] = df
 
141
 
142
  if df.empty: continue
143
 
144
+ # ==========================================================
145
+ # 🛡️ GEM-ARCHITECT FIX: Force Float Conversion
146
+ # ==========================================================
147
+ # هذا التعديل يضمن أن المكتبات الحسابية تعمل على أرقام وليس نصوص
148
+ # في حال كانت البيانات القادمة من API بصيغة String
149
+ cols_to_convert = ['open', 'high', 'low', 'close', 'volume']
150
+ for col in cols_to_convert:
151
+ if col in df.columns:
152
+ df[col] = df[col].astype(float)
153
+ # ==========================================================
154
+
155
  # تطبيق المؤشرات حسب الإطار
156
  df = self.apply_inverted_pyramid(df, tf)
157
  processed_tfs[tf] = df