# V111 DERIV - WAIT ZONE AUTO BOT # Copy of your Gold V111 - converted for Deriv synthetics # pip install deriv-api import asyncio from deriv_api import DerivAPI import time TOKEN = "YOUR_DERIV_TOKEN" # Get: Deriv -> Account Settings -> API Token SYMBOL = "R_75" # R_75, BOOM_500, CRASH_500, R_100 STAKE = 0.35 MAX_LOSS_STREAK = 2 # Guardian kill switch DAILY_TARGET = 15 price_hist = [] loss_streak = 0 total_profit = 0 def calc_ema(prices, period): if len(prices) < period: return prices[-1] k = 2 / (period + 1) ema = sum(prices[:period]) / period for p in prices[period:]: ema = p * k + ema * (1-k) return ema def calc_rsi(prices, period=14): if len(prices) < period+1: return 50 gains = 0 losses = 0 for i in range(len(prices)-period, len(prices)): diff = prices[i] - prices[i-1] if diff > 0: gains += diff else: losses += -diff if losses < 0.001: return 78 if gains < 0.001: return 22 rs = gains / losses return 100 - (100 / (1+rs)) async def analyze_v111(price): global price_hist price_hist.append(price) if len(price_hist) > 120: price_hist = price_hist[-120:] if len(price_hist) < 30: return "WAIT", "Loading..." ema9 = calc_ema(price_hist, 9) ema21 = calc_ema(price_hist, 21) rsi = calc_rsi(price_hist, 14) recent_high = max(price_hist[-30:]) recent_low = min(price_hist[-30:]) vol = sum(abs(price_hist[i]-price_hist[i-1]) for i in range(1,len(price_hist)))/len(price_hist) # === V111 CORE - YOUR EXACT CODE FROM HTML === # This is line 139-143 from your file if "R_75" in SYMBOL or "R_100" in SYMBOL: wall_low = recent_high - 800 wall_high = recent_high + 300 breakout_buffer = 600 else: # Gold logic for Boom/Crash wall_low = recent_high - 1.8 wall_high = recent_high + 0.8 breakout_buffer = 1.2 in_trap_zone = wall_low <= price <= wall_high if in_trap_zone: return "WAIT", f"🚧 WAIT ZONE {wall_low:.2f} - {wall_high:.2f} | Price {price:.2f} INSIDE TRAP WALL (where you lost 4154.17) | High {recent_high:.2f} | Vol {vol:.4f} - NO TRADE" votes = {"BUY":0, "SELL":0} heatmap = "" # AI-1 TREND if ema9 > ema21: votes["BUY"] += 1 trend = "BUY" else: votes["SELL"] += 1 trend = "SELL" # AI-2 STRUCTURE if price >= recent_high: votes["BUY"] += 1 struct = "BREAKOUT BUY" else: votes["SELL"] += 1 struct = "SELL" # AI-5 HEATMAP / BOOKMAP if price > recent_high + breakout_buffer: heatmap = f"HEATMAP: {price:.2f} ABOVE wall {recent_high:.2f} - SELL wall broken - DOM BUY>SELL - Breakout confirmed" votes["BUY"] += 3 elif price < recent_low - breakout_buffer: heatmap = f"HEATMAP: {price:.2f} BELOW low {recent_low:.2f} - BUY wall broken - Breakdown" votes["SELL"] += 3 else: heatmap = f"HEATMAP: Balanced outside wall - Safe - Vol {vol:.4f}" final = "BUY" if votes["BUY"] > votes["SELL"] else "SELL" if votes["SELL"] > votes["BUY"] else "WAIT" reason = f"V111 {final} | EMA9 {ema9:.2f} vs EMA21 {ema21:.2f}={trend} | {struct} | RSI {rsi:.1f} | High {recent_high:.2f} | {heatmap}" return final, reason async def main(): global loss_streak, total_profit api = DerivAPI(app_id=1089) await api.authorize(TOKEN) print(f"=== V111 DERIV WAIT ZONE STARTED ===") print(f"Symbol: {SYMBOL} | Stake: ${STAKE}") print(f"Trap Zone logic: COPY of your Gold V111") while True: if loss_streak >= MAX_LOSS_STREAK: print(f"🛑 GUARDIAN KILL SWITCH: {loss_streak} losses - WAIT 30 min (V111 protection)") await asyncio.sleep(1800) loss_streak = 0 continue if total_profit >= DAILY_TARGET: print(f"✅ TARGET ${DAILY_TARGET} HIT - STOP") break # Get live tick tick = await api.ticks_history({"ticks_history": SYMBOL, "count": 1, "end": "latest", "style": "ticks"}) price = float(tick['history']['prices'][-1]) signal, reason = await analyze_v111(price) print(f"{time.strftime('%H:%M:%S')} | Price {price:.2f} | {signal} | {reason}") if signal != "WAIT": # Place trade contract_type = "CALL" if signal == "BUY" else "PUT" try: buy = await api.buy({ "buy": 1, "price": STAKE, "parameters": { "amount": STAKE, "basis": "stake", "contract_type": contract_type, "currency": "USD", "duration": 5, "duration_unit": "t", "symbol": SYMBOL } }) await asyncio.sleep(7) profit_table = await api.profit_table({"profit_table": 1, "limit": 1}) profit = float(profit_table['profit_table']['transactions'][0]['sell_price']) - float(profit_table['profit_table']['transactions'][0]['buy_price']) total_profit += profit if profit > 0: print(f"✅ WIN +${profit:.2f} | Total ${total_profit:.2f}") loss_streak = 0 else: print(f"❌ LOSS ${profit:.2f} | Total ${total_profit:.2f}") loss_streak += 1 except Exception as e: print(f"Error: {e}") await asyncio.sleep(2) asyncio.run(main())