bot.py
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- cli, data-visualization
Research direction
The issue is a code dump of a trading bot script with no description of what needs to be fixed or changed. The repository is a Telegram files store bot, so this script appears unrelated. To understand the issue, first check if there are any comments or context in the GitHub issue thread. Then, compare the provided bot.py with the existing code in the repository to see if it's a proposed addition or a bug report. Look for any error messages or specific problems mentioned in the issue body or comments.
Written by the indexing model from the issue text.
Description
import telebot
from telebot import types
import yfinance as yf
import pandas as pd
import pandas_ta as ta # مكتبة للتحليل الفني المتقدم
import random
import time
API_TOKEN = '8520359044:AAE_rauPy-TUhNgOYxkIByOC-5fnV9Aj15c'
bot = telebot.TeleBot(API_TOKEN)
def advanced_analysis(symbol):
try:
# جلب بيانات كافية للتحليل (آخر 200 دقيقة)
df = yf.download(symbol, period='1d', interval='1m', progress=False)
if df.empty or len(df) < 50: return "⚠️ سيولة ضعيفة حالياً، انتظر توفر البيانات."
# 1. حساب المؤشرات الفنية
df['EMA_200'] = ta.ema(df['Close'], length=50) # متوسط الاتجاه
df['RSI'] = ta.rsi(df['Close'], length=14) # قوة الزخم
last_row = df.iloc[-1]
prev_row = df.iloc[-2]
current_price = float(last_row['Close'])
rsi_val = float(last_row['RSI'])
ema_val = float(last_row['EMA_200'])
# 2. منطق "الفلترة الاحترافية"
signal = "⚖️ انتظر فرصة أفضل"
decision = None
# شروط الشراء القوية (SMC + Trend)
if current_price > ema_val and rsi_val < 70 and last_row['Close'] > last_row['Open']:
if current_price > df['High'].iloc[-5:-1].max(): # كسر قمة قريبة (MSB)
decision = "BUY"
signal = f"🟢 **إشارة شراء (CALL) قوية**\n🔥 السعر فوق الـ EMA ومتجه للأعلى."
# شروط البيع القوية (SMC + Trend)
elif current_price < ema_val and rsi_val > 30 and last_row['Close'] < last_row['Open']:
if current_price < df['Low'].iloc[-5:-1].min(): # كسر قاع قريب (MSB)
decision = "SELL"
signal = f"🔴 **إشارة بيع (PUT) قوية**\n🔥 السعر كسر الهيكل لأسفل."
if decision:
win_rate = random.randint(88, 94)
return f"{signal}\n🎯 السعر: `{current_price:.5f}`\n📈 RSI: {rsi_val:.1f}\n✅ الثقة: {win_rate}%"
else:
return "⚠️ **السوق حالياً متذبذب (عرضي)**\nلا توجد إشارة دخول آمنة، يفضل الانتظار."
except Exception as e:
return "❌ فشل التحليل الفني، حاول مرة أخرى."
--- الواجهة والأوامر ---
@bot.message_handler(commands=['start'])
def start(message):
markup = types.ReplyKeyboardMarkup(row_width=2, resize_keyboard=True)
markup.add('EUR/USD', 'GBP/USD', 'USD/JPY', 'XAU/USD (الذهب)', '📊 فحص السيولة')
bot.send_message(message.chat.id, "💎 بوت التحليل الاحترافي V4.0\nتم تفعيل فلاتر SMC و EMA لضمان دقة الإشارات.", reply_markup=markup)
@bot.message_handler(func=lambda message: True)
def handle_requests(message):
pairs = {'EUR/USD': 'EURUSD=X', 'GBP/USD': 'GBPUSD=X', 'USD/JPY': 'JPY=X', 'XAU/USD (الذهب)': 'GC=F'}
if message.text in pairs:
loading = bot.send_message(message.chat.id, "🔍 جاري فحص 200 شمعة وتطبيق فلاتر السيولة...")
result = advanced_analysis(pairs[message.text])
final_msg = (
f"📥 **نتائج التحليل الفوري**\n"
f"--------------------------\n"
f"💹 الزوج: {message.text}\n"
f"{result}\n"
f"--------------------------\n"
f"💡 *نصيحة: إذا ظهرت رسالة 'انتظر'، فلا تدخل الصفقة أبداً.*"
)
bot.delete_message(message.chat.id, loading.message_id)
bot.send_message(message.chat.id, final_msg, parse_mode="Markdown")
if name == "main":
bot.polling(none_stop=True)
- Dominant language
- Python
- Stars
- 225
- Forks
- 672
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AbirHasan2005/PyroFilesStoreBot
-
KetabOpen
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
requirements.txtOpen
Difficulty 1/5 Under an hour Newbie friendliness 20/100
-
bot.pyOpen
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
bot.pyOpen
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
requirements.txtOpen
Difficulty 1/5 Under an hour Newbie friendliness 10/100
All issues in AbirHasan2005/PyroFilesStoreBot
Similar issues
-
New InternshipOpennew_internship
Difficulty 1/5 Under an hour Newbie friendliness 70/100
-
[BUG] Reports tab: "Unban" button tooltip shows raw `{{ip}}` placeholder instead of the IP addressOpenbug javascript ui
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
bunkerity/bunkerweb#4001 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
PedestrianDynamics/pyFDS-Evac#476 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
google/differential-privacy#516 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
adobe-fonts/source-serif#153 ·