Spezifikation

import ccxt
import pandas as pd
import numpy as np
import talib
import time

# Configuration
exchange = ccxt.binance({
    'apiKey': 'VOTRE_API_KEY',
    'secret': 'VOTRE_SECRET_KEY',
})

# Paramètres de trading
symbole = 'BTC/USDT'
timeframe = '1h'
montant = 100  # en USDT
stop_loss = 0.98  # 2% de perte maximale
take_profit = 1.03  # 3% de gain

def recuperer_donnees():
    ohlcv = exchange.fetch_ohlcv(symbole, timeframe, limit=100)
    df = pd.DataFrame(ohlcv, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume'])
    df['timestamp'] = pd.to_datetime(df['timestamp'], unit='ms')
    return df

def calculer_indicateurs(df):
    df['ema_50'] = talib.EMA(df['close'].values, timeperiod=50)
    df['ema_200'] = talib.EMA(df['close'].values, timeperiod=200)
    df['rsi'] = talib.RSI(df['close'].values, timeperiod=14)
    return df

def strategie(df):
    if df['ema_50'].iloc[-1] > df['ema_200'].iloc[-1] and df['rsi'].iloc[-1] < 70:
        return 'acheter'
    elif df['ema_50'].iloc[-1] < df['ema_200'].iloc[-1] and df['rsi'].iloc[-1] > 30:
        return 'vendre'
    else:
        return 'neutre'

def trader():
    df = recuperer_donnees()
    df = calculer_indicateurs(df)
    signal = strategie(df)

    if signal == 'acheter':
        try:
            ordre = exchange.create_market_buy_order(symbole, montant)
            print(f"Achetés {montant} {symbole}")
        except Exception as e:
            print(f"Erreur d'achat : {e}")
    elif signal == 'vendre':
        try:
            ordre = exchange.create_market_sell_order(symbole, montant)
            print(f"Vendus {montant} {symbole}")
        except Exception as e:
            print(f"Erreur de vente : {e}")

while True:
    trader()
    time.sleep(3600)  # attendre 1 heure

Bewerbungen

1
Entwickler 1
Bewertung
(5)
Projekte
7
0%
Schlichtung
8
13% / 75%
Frist nicht eingehalten
3
43%
Frei
2
Entwickler 2
Bewertung
(28)
Projekte
39
23%
Schlichtung
14
0% / 93%
Frist nicht eingehalten
4
10%
Frei
3
Entwickler 3
Bewertung
(298)
Projekte
478
40%
Schlichtung
105
40% / 24%
Frist nicht eingehalten
82
17%
Beschäftigt
Veröffentlicht: 2 Beispiele
4
Entwickler 4
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
5
Entwickler 5
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Veröffentlicht: 8 Beispiele
6
Entwickler 6
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Ähnliche Aufträge
Bonjour, Je recherche un développeur expérimenté pour créer mon propre robot de trading automatique nommé JAD’OR X. Étant débutant en trading, je souhaite que le développeur me propose une stratégie documentée et adaptée au trading de l’or. Caractéristiques principales : MetaTrader 5 / MQL5. Trading XAUUSD uniquement. Achats et ventes entièrement automatiques. Analyse des tendances, supports et résistances. Stop Loss
Lucky forex 30+ USD
Bonjour, Je souhaite commander un robot de trading automatique pour MetaTrader 5 (MT5). Le robot doit être spécialisé uniquement dans le trading de l’or (XAUUSD). Mes exigences : * Détecter automatiquement les opportunités d’achat et de vente. * Utiliser des indicateurs comme RSI, moyennes mobiles et autres outils de confirmation. * Intégrer un Stop Loss et un Take Profit. * Gérer automatiquement les risques. *

Projektdetails

Budget
30 - 200 USD