⏱️ Urgent project – looking for an experienced developer to finalize MT4 bot (deadline: Tuesday)

Spezifikation

"""
Fast Multi-Pair RSI Trading Bot
Supports:
- BTCUSDT
- XAUUSD
- GBPUSD

Opens fast buy or sell trades based on RSI signals
Closes trades after 5, 10, or 15 minutes
"""

import asyncio
import time
from dataclasses import dataclass, field
from typing import Dict, List, Optional
import pandas as pd
import numpy as np

# ===== RSI calculation ===== #
def compute_rsi(close: pd.Series, period: int = 14) -> pd.Series:
    delta = close.diff()
    gain = delta.clip(lower=0)
    loss = -delta.clip(upper=0)
    avg_gain = gain.ewm(alpha=1 / period, adjust=False).mean()
    avg_loss = loss.ewm(alpha=1 / period, adjust=False).mean()
    rs = avg_gain / avg_loss
    return 100 - (100 / (1 + rs))

# ===== Position structure ===== #
@dataclass
class Position:
    id: str
    symbol: str
    side: str
    entry_price: float
    size: float
    opened_at: float
    duration_min: int

# ===== Config ===== #
@dataclass
class BotConfig:
    symbols: List[str] = field(default_factory=lambda: ["BTCUSDT", "XAUUSD", "GBPUSD"])
    rsi_period: int = 14
    rsi_oversold: int = 30
    rsi_overbought: int = 70
    durations_min: List[int] = field(default_factory=lambda: [5, 10, 15])
    account_equity: float = 2000.0
    risk_pct: float = 0.5
    lot_size: Optional[float] = None
    paper: bool = True

# ===== Trading Bot ===== #
class MultiPairRSIBot:
    def __init__(self, cfg: BotConfig):
        self.cfg = cfg
        self.data: Dict[str, pd.DataFrame] = {sym: pd.DataFrame() for sym in cfg.symbols}
        self.positions: Dict[str, Dict[str, Position]] = {sym: {} for sym in cfg.symbols}
        self._id = 0

    # ========== Fake 1-minute feed for PAPER mode ========== #
    def get_fake_ohlcv(self, symbol):
        now = int(time.time()) * 1000
        df = self.data[symbol]

        last_close = df["close"].iloc[-1] if not df.empty else 1000 + np.random.rand() * 10
        change = np.random.normal(0, 0.0008)
        close = last_close * (1 + change)
        high = max(last_close, close)
        low = min(last_close, close)

        return (now, last_close, high, low, close, 0)

    # ========== Append new candle ========== #
    def append_candle(self, symbol, ohlc):
        ts, o, h, l, c, v = ohlc
        row = {"timestamp": pd.to_datetime(ts, unit="ms"),
               "open": o, "high": h, "low": l, "close": c, "volume": v}
        self.data[symbol] = pd.concat([self.data[symbol], pd.DataFrame([row])], ignore_index=True)
        if len(self.data[symbol]) > 2000:
            self.data[symbol] = self.data[symbol].iloc[-2000:]

    # ========== Timeframe aggregation ========== #
    def to_tf(self, symbol, minutes):
        df = self.data[symbol]
        if df.empty:
            return pd.DataFrame()
        df["bucket"] = df["timestamp"].dt.floor(f"{minutes}T")
        out = df.groupby("bucket").agg({
            "open": "first",
            "high": "max",
            "low": "min",
            "close": "last",
            "volume": "sum"
        }).reset_index().rename(columns={"bucket": "timestamp"})
        return out

    # ========== Position sizing ========== #
    def get_size(self, price):
        if self.cfg.lot_size:
            return self.cfg.lot_size
        risk_amount = self.cfg.account_equity * (self.cfg.risk_pct / 100)
        return round(risk_amount / price, 4)

    # ========== Check RSI signals and enter trades ========== #
    async def process_signals(self, symbol):
        for dur in self.cfg.durations_min:
            df = self.to_tf(symbol, dur)
            if len(df) < self.cfg.rsi_period + 2:
                continue

            df["rsi"] = compute_rsi(df["close"], self.cfg.rsi_period)

            prev = df["rsi"].iloc[-2]
            last = df["rsi"].iloc[-1]
            price = df["close"].iloc[-1]

            # BUY: RSI cross up
            if prev <= self.cfg.rsi_oversold and last > prev:
                size = self.get_size(price)
                await self.open_position(symbol, "buy", price, size, dur)

            # SELL: RSI cross down
            if prev >= self.cfg.rsi_overbought and last < prev:
                size = self.get_size(price)
                await self.open_position(symbol, "sell", price, size, dur)

    # ========== Open position ========== #
    async def open_position(self, symbol, side, price, size, duration):
        self._id += 1
        pid = f"{symbol}_{self._id}"
        print(f"[{symbol}] OPEN {side.upper()} @ {price:.2f} | {duration}m | size {size}")

        pos = Position(
            id=pid,
            symbol=symbol,
            side=side,
            entry_price=price,
            size=size,
            opened_at=time.time(),
            duration_min=duration
        )
        self.positions[symbol][pid] = pos

    # ========== Close expired trades ========== #
    async def close_expired(self, symbol):
        now = time.time()
        to_close = []

        for pid, pos in self.positions[symbol].items():
            if (now - pos.opened_at) / 60 >= pos.duration_min:
                to_close.append(pid)

        for pid in to_close:
            await self.close_position(symbol, pid)

    # ========== Close position ========== #
    async def close_position(self, symbol, pid):
        pos = self.positions[symbol][pid]
        last_price = self.data[symbol]["close"].iloc[-1]
        pnl = (last_price - pos.entry_price) * pos.size if pos.side == "buy" else (pos.entry_price - last_price) * pos.size

        print(f"[{symbol}] CLOSE {pos.side.upper()} @ {last_price:.2f} | PnL = {pnl:.3f}")
        self.cfg.account_equity += pnl
        del self.positions[symbol][pid]

    # ========== Main loop ========== #
    async def start(self):
        print("Starting multi-pair RSI bot...")
        print("Symbols:", self.cfg.symbols)

        while True:
            try:
                for symbol in self.cfg.symbols:

                    # new candle
                    ohlcv = self.get_fake_ohlcv(symbol)
                    self.append_candle(symbol, ohlcv)

                    # signal scan
                    await self.process_signals(symbol)

                    # manage trades
                    await self.close_expired(symbol)

            except Exception as e:
                print("Error:", e)

            await asyncio.sleep(1)

# ========== Launch Example ========== #
async def main():
    cfg = BotConfig(
        symbols=["BTCUSDT", "XAUUSD", "GBPUSD"],
        account_equity=3000.0,
        paper=True,
        lot_size=None
    )
    bot = MultiPairRSIBot(cfg)

    task = asyncio.create_task(bot.start())
    await asyncio.sleep(60 * 5) # run 5 minutes demo
    task.cancel()

if __name__ == "__main__":
    asyncio.run(main())

Bewerbungen

1
Entwickler 1
Bewertung
(630)
Projekte
994
47%
Schlichtung
33
36% / 36%
Frist nicht eingehalten
98
10%
Frei
Veröffentlicht: 6 Beispiele
2
Entwickler 2
Bewertung
(19)
Projekte
23
9%
Schlichtung
6
33% / 50%
Frist nicht eingehalten
1
4%
Überlastet
3
Entwickler 3
Bewertung
(43)
Projekte
50
28%
Schlichtung
14
21% / 64%
Frist nicht eingehalten
1
2%
Arbeitet
4
Entwickler 4
Bewertung
(6)
Projekte
5
0%
Schlichtung
3
33% / 67%
Frist nicht eingehalten
2
40%
Frei
5
Entwickler 5
Bewertung
(8)
Projekte
11
0%
Schlichtung
7
29% / 71%
Frist nicht eingehalten
2
18%
Arbeitet
6
Entwickler 6
Bewertung
(16)
Projekte
35
23%
Schlichtung
4
0% / 50%
Frist nicht eingehalten
2
6%
Arbeitet
7
Entwickler 7
Bewertung
(1)
Projekte
2
0%
Schlichtung
2
0% / 50%
Frist nicht eingehalten
0
Frei
8
Entwickler 8
Bewertung
(2)
Projekte
2
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
9
Entwickler 9
Bewertung
(16)
Projekte
20
10%
Schlichtung
8
38% / 38%
Frist nicht eingehalten
3
15%
Arbeitet
10
Entwickler 10
Bewertung
(568)
Projekte
657
32%
Schlichtung
41
41% / 46%
Frist nicht eingehalten
11
2%
Überlastet
11
Entwickler 11
Bewertung
(14)
Projekte
19
11%
Schlichtung
4
50% / 25%
Frist nicht eingehalten
4
21%
Arbeitet
12
Entwickler 12
Bewertung
(4)
Projekte
3
33%
Schlichtung
2
0% / 100%
Frist nicht eingehalten
0
Frei
13
Entwickler 13
Bewertung
(2660)
Projekte
3379
68%
Schlichtung
77
48% / 14%
Frist nicht eingehalten
342
10%
Frei
Veröffentlicht: 1 Beispiel
14
Entwickler 14
Bewertung
(2)
Projekte
3
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
15
Entwickler 15
Bewertung
(1)
Projekte
0
0%
Schlichtung
1
0% / 100%
Frist nicht eingehalten
0
Frei
16
Entwickler 16
Bewertung
(1)
Projekte
1
100%
Schlichtung
0
Frist nicht eingehalten
0
Frei
17
Entwickler 17
Bewertung
(258)
Projekte
264
30%
Schlichtung
0
Frist nicht eingehalten
3
1%
Frei
Veröffentlicht: 2 Beispiele
18
Entwickler 18
Bewertung
(25)
Projekte
29
21%
Schlichtung
20
10% / 50%
Frist nicht eingehalten
8
28%
Beschäftigt
19
Entwickler 19
Bewertung
(8)
Projekte
9
0%
Schlichtung
2
0% / 50%
Frist nicht eingehalten
1
11%
Arbeitet
20
Entwickler 20
Bewertung
(298)
Projekte
477
40%
Schlichtung
105
40% / 24%
Frist nicht eingehalten
81
17%
Beschäftigt
Veröffentlicht: 2 Beispiele
21
Entwickler 21
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
22
Entwickler 22
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
23
Entwickler 23
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Ähnliche Aufträge
Early Killer EA 30+ USD
It must have automated stop loss. Something that can end poverty and kill the market early.It must take the trades for me whenever I start it it must work on tradeport ea
I want to use a ai subscription service called Clarifai as an image identification tool, and I wish to use it in response to screenshots of my signals being generated and placed in a folder. -I believe there needs to be a script that responds to a new screenshot being added to a specific folder That script then sends the image to Clarifai, and then Clarifai needs to be instructed to scan that image and look for
buy condition when blue color appears sell condition when yellow color appears close all buys when there is a sell order close all sells when there is a buy order
Mk 30+ USD
I need a fully automated trading robot designed to generate consistent profits while strictly controlling risk and minimizing losses. The robot should use a combination of strategies, including trend-following, scalping, and price action, and must be able to adapt to different market conditions such as trending and ranging markets. It should analyze the market using indicators like Moving Averages, RSI, MACD, and
1. IF price forms: - Higher highs + higher lows → TREND = BUY - Lower highs + lower lows → TREND = SELL ELSE → NO TRADE 2. IF: - Trend = BUY - Price retraces to support zone - Bullish engulfing candle forms - TDI green crosses above red (optional) THEN: - Execute BUY 3. IF: - Trend = SELL - Price retraces to resistance - Bearish engulfing forms - TDI confirms THEN: - Execute SELL 4. Risk per trade = 1% of account Lot

Projektdetails

Budget
50+ USD