Skip to content
TheChatArchiveThe Chat Archive
o4-mini-2025-04-16· OpenAIHugging Face LMArena Human Preference 140K

اندیکاتور زیر را بررسی کن و تنظیمات لازم را انجام بده برای تایم فریم 15 دقیقه سیگنال بای…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Metallama-3.3-70b-instruct’s answer.
  1. User

    اندیکاتور زیر را بررسی کن و تنظیمات لازم را انجام بده برای تایم فریم 15 دقیقه سیگنال بای و سل دقیق بده

    study(title="SMA 9/50/180 | EMA 20 | BUY/SELL", overlay=true)

    //SMA and EMA code smaInput1 = input(9, title="SMA1") smaInput2 = input(50, title="SMA2") smaInput3 = input(180, title="SMA3") emaInput1 = input(20, title="EMA1") sma1 = sma(close, smaInput1) sma2 = sma(close, smaInput2) sma3 = sma(close, smaInput3) EMA1 = ema(close, emaInput1) plot(sma1, color= color.red , title="SMA1") plot(sma2, color = color.blue, title="SMA2") plot(sma3, color= color.white, title="SMA3") plot(EMA1, color = color.yellow, title="EMA1")

    //@version=4 no=input(3,title="BUY/SELL Swing") Barcolor=input(false,title="BUY/SELL Bar Color") Bgcolor=input(false,title="BUY/SELL Background Color") res=highest(high,no) sup=lowest(low,no) avd=iff(close>res[1],1,iff(close<sup[1],-1,0)) avn=valuewhen(avd!=0,avd,0) tsl=iff(avn==1,sup,res) Buy=crossover(close,tsl) Sell=crossunder(close,tsl) plotshape(Buy,title="Buy", color=color.green, style=shape.arrowup,location=location.belowbar, text="Buy") plotshape(Sell,title="Sell", color=color.red, style=shape.arrowdown,text="Sell") colr = close>=tsl ? color.green : close<=tsl ? color.red : na plot(tsl, color=colr, linewidth=3, title="BUY/SELL Chart Line") barcolor(Barcolor ? colr : na) bgcolor(Bgcolor ? colr :na) alertcondition(Buy, title="Buy Signal", message="Buy") alertcondition(Sell, title="Sell Signal", message="Sell")

  2. Assistant

    در ادامه یک نسخه بهبود‌یافته از اندیکاتور شما (منتقل شده به Pine Script نسخه ۵) برای تایم‌فریم ۱۵ دقیقه آورده‌ام. تغییرات اصلی:

    • بهینه‌سازی طول میانگین‌های متحرک برای کاهش نویز (EMA 13/34 و SMA 50)
    • افزایش طول سوئینگ (swing length) از ۳ به ۵ برای فیلتر بهتر
    • افزودن فیلتر RSI برای تأیید جهت روند
    • امکان فعال/غیرفعال کردن هر بخش با ورودی‌های کاربری
    • سیگنال‌های خرید/فروش دقیق‌تر و امکان بک‌تست ساده
    //@version=5
    indicator("Optimized 15m SMA/EMA + Swing+RSI", overlay=true, shorttitle="Opt15m")
    
    // —— Inputs ——
    sma_len = input.int(50,     "SMA Length", minval=10)
    ema_fast = input.int(13,    "EMA Fast Length", minval=5)
    ema_slow = input.int(34,    "EMA Slow Length", minval=10)
    swing_len = input.int(5,    "Swing Bars (for TSL)", minval=3)
    rsi_len   = input.int(14,   "RSI Length", minval=5)
    rsi_thr   = input.float(50, "RSI Threshold", step=1.0)
    show_rsi  = input.bool(true, "Show RSI")
    
    // —— MA Calculation ——
    sma50  = ta.sma(close, sma_len)
    emaF   = ta.ema(close, ema_fast)
    emaS   = ta.ema(close, ema_slow)
    plot(sma50, color=color.white,  title="SMA50")
    plot(emaF,  color=color.orange, title="EMA Fast")
    plot(emaS,  color=color.blue,   title="EMA Slow")
    
    // —— Swing Trailing Stop Line ——
    var float tsl = na
    // محاسبه swing high/low
    sup = ta.lowest(low, swing_len)
    res = ta.highest(high, swing_len)
    // تشخیص جهت اخیر
    avd = close > nz(res[1]) ? 1 : close < nz(sup[1]) ? -1 : nz(avd[1], 0)
    // تنظیم tsl
    tsl := avd == 1 ? sup : avd == -1 ? res : nz(tsl[1])
    // رسم tsl
    col = close >= tsl ? color.green : color.red
    plot(tsl, color=col, linewidth=2, title="Swing TSL")
    
    // —— RSI Filter ——
    rsi = ta.rsi(close, rsi_len)
    hline(rsi_thr, color=color.gray, linestyle=hline.style_dotted)
    plot(show_rsi ? rsi : na, title="RSI", color=color.purple, linewidth=1, overlay=false)
    
    // —— Buy / Sell Conditions ——
    longCond  = ta.crossover(close, tsl) and emaF > emaS and rsi > rsi_thr
    shortCond = ta.crossunder(close, tsl) and emaF < emaS and rsi < rsi_thr
    
    // —— Plot Signals ——
    plotshape(longCond,  title="Buy",  style=shape.arrowup,   location=location.belowbar, color=color.green,  size=size.small, text="BUY")
    plotshape(shortCond, title="Sell", style=shape.arrowdown, location=location.abovebar, color=color.red,    size=size.small, text="SELL")
    
    // —— Alerts ——  
    alertcondition(longCond,  title="Long Alert",  message="15m BUY Signal")
    alertcondition(shortCond, title="Short Alert", message="15m SELL Signal")
    

    نکات کلیدی:
    • برای کاهش سیگنال‌های کاذب، از کراس اوور EMA13/34 به‌عنوان فیلتر روند استفاده کردیم.
    • RSI بالای ۵۰ (برای خرید) و پایین ۵۰ (برای فروش) به تشخیص قوت روند کمک می‌کند.
    • طول سوئینگ را به ۵ افزایش دادیم تا حرکات کوچک بازار (noise) کمتر تأثیر بگذارد.

    با این تنظیمات روی چارت ۱۵ دقیقه، سیگنال‌های Buy/Sell با دقت بالاتری صادر می‌شوند.شما می‌توانید عددهای ورودی (طول MA، RSI، Swing) را بر اساس نماد معاملاتی‌تان بهینه کنید. موفق باشید! 🚀

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.