Screenshots
Item Description
import osimport numpy as npimport pandas as pdfrom binance import Clientfrom datetime import datetimeimport tkinter as tkfrom ta.momentum import RSIIndicator, StochasticOscillatorfrom ta.trend import EMAIndicator, MACDfrom ta.volatility import BollingerBandsimport threadingimport timefrom dotenv import load_dotenv
class SmartSignalAnalyzer:def __init__(self):load_dotenv()self.client = Client(os.getenv('BINANCE_API_KEY'), os.getenv('BINANCE_API_SECRET'))self.symbol = "EURUSDT"self.interval = Client.KLINE_INTERVAL_1MINUTEself.lookback = 100self.last_update = Noneself.last_price = 0self.setup_gui()self.running = Trueself.start_data_thread()
def setup_gui(self):self.root = tk.Tk()self.root.title("Smart Binary Signals")self.root.configure(bg='#1E1E1E')self.root.geometry("800x300")
# Main containermain_frame = tk.Frame(self.root, bg='#1E1E1E')main_frame.pack(fill=tk.BOTH, expand=True, padx=20, pady=10)
# Price and Time Panelself.setup_header(main_frame)# Signals Panelself.setup_signals_panel(main_frame)
def setup_header(self, parent):header = tk.Frame(parent, bg='#2E2E2E')header.pack(fill=tk.X, pady=(0, 10))# Left side - Priceprice_frame = tk.Frame(header, bg='#2E2E2E')price_frame.pack(side=tk.LEFT, padx=20, pady=10)tk.Label(price_frame,text="EUR/USD",font=("Helvetica", 12),bg='#2E2E2E',fg='#888888').pack()self.price_label = tk.Label(price_frame,text="0.00000",font=("Helvetica", 32, "bold"),bg='#2E2E2E',fg='#00FF00')self.price_label.pack()# Right side - Time and Updatetime_frame = tk.Frame(header, bg='#2E2E2E')time_frame.pack(side=tk.RIGHT, padx=20, pady=10)self.time_label = tk.Label(time_frame,text="",font=("Helvetica", 12),bg='#2E2E2E',fg='#888888')self.time_label.pack()self.update_label = tk.Label(time_frame,text="Last Update: Never",font=("Helvetica", 10),bg='#2E2E2E',fg='#666666')self.update_label.pack()
def setup_signals_panel(self, parent):signals_frame = tk.LabelFrame(parent,text=" Trading Signals ",font=("Helvetica", 12, "bold"),bg='#2E2E2E',fg='white')signals_frame.pack(fill=tk.X, pady=(0, 10))# Headersheaders = ['Timeframe', 'Signal', 'Confidence', 'Entry', 'Direction']for i, header in enumerate(headers):tk.Label(signals_frame,text=header,font=("Helvetica", 11, "bold"),bg='#2E2E2E',fg='#AAAAAA',width=15).grid(row=0, column=i, padx=5, pady=5)# Signal rowsself.signal_rows = {}timeframes = ['30 Seconds', '1 Minute']for i, timeframe in enumerate(timeframes, 1):row_labels = []for j in range(len(headers)):label = tk.Label(signals_frame,text="-",font=("Helvetica", 12),bg='#2E2E2E',fg='white',width=15)label.grid(row=i, column=j, padx=5, pady=10)row_labels.append(label)self.signal_rows[timeframe] = row_labels
def calculate_indicators(self, df):try:df['rsi'] = RSIIndicator(df['close']).rsi()df['stoch_k'] = StochasticOscillator(df['high'], df['low'], df['close']).stoch()macd = MACD(df['close'])df['macd'] = macd.macd()df['macd_signal'] = macd.macd_signal()df['macd_hist'] = macd.macd_diff()for period in [8, 21]:df[f'ema_{period}'] = EMAIndicator(df['close'], period).ema_indicator()bb = BollingerBands(df['close'])df['bb_upper'] = bb.bollinger_hband()df['bb_middle'] = bb.bollinger_mavg()df['bb_lower'] = bb.bollinger_lband()df['volume_sma'] = df['volume'].rolling(20).mean()return dfexcept Exception as e:print(f"Error calculating indicators: {e}")return None
def analyze_signals(self, df):try:signals = {}last_row = df.iloc[-1]last_5_rows = df.iloc[-5:]for timeframe in ['30 Seconds', '1 Minute']:# Initialize confidence calculationsignal_strength = 0total_signals = 0# Trend Analysistrend_direction = 1 if last_row['ema_8'] > last_row['ema_21'] else -1trend_strength = abs(last_row['ema_8'] - last_row['ema_21']) / last_row['ema_21'] * 100# RSI Analysisrsi_signal = 0if last_row['rsi'] < 30:rsi_signal = 1elif last_row['rsi'] > 70:rsi_signal = -1# MACD Analysismacd_signal = 0if last_row['macd'] > last_row['macd_signal'] and last_row['macd_hist'] > 0:macd_signal = 1elif last_row['macd'] < last_row['macd_signal'] and last_row['macd_hist'] < 0:macd_signal = -1# Price Positionprice_signal = 0if last_row['close'] < last_row['bb_lower']:price_signal = 1elif last_row['close'] > last_row['bb_upper']:price_signal = -1# Calculate total signal strengthsignals_list = [trend_direction * (trend_strength > 0.05),rsi_signal,macd_signal,price_signal]signal_strength = sum([s for s in signals_list if s != 0])total_signals = sum([1 for s in signals_list if s != 0])# Calculate confidenceconfidence = 0signal = "NEUTRAL"if total_signals > 0:confidence = abs(signal_strength / total_signals) * 100# Adjust confidence based on timeframeif timeframe == '30 Seconds':confidence *= 0.95# Only generate signal if confidence is high enoughif confidence >= 90:signal = "CALL" if signal_strength > 0 else "PUT"signals[timeframe] = {'signal': signal,'confidence': min(confidence, 99),'entry': last_row['close'],'direction': "↑" if signal == "CALL" else "↓" if signal == "PUT" else "-"}return signalsexcept Exception as e:print(f"Error analyzing signals: {e}")return None
def update_signal_rows(self, signals):if not signals:returnfor timeframe, signal_data in signals.items():row = self.signal_rows[timeframe]row[0].config(text=timeframe)row[1].config(text=signal_data['signal'],fg='#00FF00' if signal_data['signal'] == 'CALL' else '#FF0000' if signal_data['signal'] == 'PUT' else '#888888')row[2].config(text=f"{signal_data['confidence']:.1f}%",fg='#00FF00' if signal_data['confidence'] >= 95 else '#FFFF00' if signal_data['confidence'] >= 90 else '#888888')row[3].config(text=f"{signal_data['entry']:.5f}")row[4].config(text=signal_data['direction'],fg='#00FF00' if signal_data['direction'] == "↑" else '#FF0000' if signal_data['direction'] == "↓" else '#888888')
def get_data(self):try:klines = self.client.get_klines(symbol=self.symbol,interval=self.interval,limit=self.lookback)df = pd.DataFrame(klines, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume','close_time', 'quote_volume', 'trades', 'taker_buy_base','taker_buy_quote', 'ignore'])df['timestamp'] = pd.to_datetime(df['timestamp'], unit='ms')for col in ['open', 'high', 'low', 'close', 'volume']:df[col] = pd.to_numeric(df[col], errors='coerce')return self.calculate_indicators(df)except Exception as e:print(f"Error fetching data: {e}")return None
def start_data_thread(self):def update_loop():while self.running:try:df = self.get_data()if df is not None:signals = self.analyze_signals(df)self.root.after(0, self.update_gui, df, signals)time.sleep(1)except Exception as e:print(f"Update error: {e}")time.sleep(1)self.update_thread = threading.Thread(target=update_loop, daemon=True)self.update_thread.start()
def update_gui(self, df, signals):if df is None or signals is None:returncurrent_time = datetime.now()# Update pricecurrent_price = df['close'].iloc[-1]self.price_label.config(text=f"{current_price:.5f}",fg='#00FF00' if current_price > self.last_price else '#FF0000')self.last_price = current_price# Update time labelsself.time_label.config(text=current_time.strftime('%H:%M:%S'))self.update_label.config(text=f"Last Update: {current_time.strftime('%H:%M:%S')}")# Update signalsself.update_signal_rows(signals)
def run(self):self.root.mainloop()self.running = False
if __name__ == "__main__":app = SmartSignalAnalyzer()app.run()
You have to login to leave a review!
All Reviews
What type of support is included?
Verified source code
Free support included
100% Satisfaction guarantee
Download code immediately after purchase
Published by the developer
Quality guarantee for your satisfaction
Support: info@sellanycode.com or live chat
Verified source code
Free support included
100% Satisfaction guarantee
Download code immediately after purchase
Published by the developer
Quality guarantee for your satisfaction
Support: info@sellanycode.com or live chat
You have to purchase this item to get support!
You have to login to ask a question!
All Questions
No Question!
Information
| Category | Scripts & Code / VB.NET |
| First Release | 26 May 2025 |
| Last updated | 26 May 2025 |
| Files included | .py |
| Frameworks | VB.NET |
100% Guarantee For Item! Money back guarantee policy applies.
Similar Items
Start Selling Your Code. Enjoy 80% Revenue Share, Fast Payouts Without Restrictions!
START SELLING NOWItem Purchase
2
Binary Option Robot Analyser EUR/USD ($400.00)
or
*Price does not include processing fee
256-bit encryption