MQL5
Indicateurs
Experts
Forex
Trading robot/indicator debugging
Strategy optimization
Statistics and mathematics
C++
Strategy modules
Python
Panels and dialog boxes
C#
Stocks
Custom graphics
Futures
MySQL
Product Design
JavaScript
Java
Collection of data on the internet
SQL
HTML
PHP
Uploading data to a website
Data mining
Text writing
Text translation
OpenCL
ALGLIB
PostgreSQL
Linux
Photoshop
RegExp
Spécifications
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
Répondu
1
Évaluation
Projets
7
0%
Arbitrage
8
13%
/
75%
En retard
3
43%
Gratuit
2
Évaluation
Projets
39
23%
Arbitrage
14
0%
/
93%
En retard
4
10%
Gratuit
3
Évaluation
Projets
478
40%
Arbitrage
105
40%
/
24%
En retard
82
17%
Chargé
Publié : 2 codes
4
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
5
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
Publié : 8 codes
6
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
Commandes similaires
Rim crazzack
30 - 300 USD
Je souhaite développer un robot de trading automatique capable de fonctionner uniquement lorsque je suis connecté à mon compte de trading. Le robot devra respecter les règles suivantes : Il peut ouvrir positions que lorsque je suis connecté. Il doit analyser les marchés en temps réel sur les unités de temps M1 (1 minute), M5 (5 minutes) et M15 (15 minutes). Il doit identifier des opportunités d'achat ou de vente en
Je recherche un EA fully automatique pour Volatility 75 et Volatility 100 sur Deriv/MT5. Logique de trading (5 modules) : Breakout – Cassure confirmée d'un niveau S/R sur H4/Daily, confirmation clôture H1 Rebond – Entrée quand le prix touche un S/R et repart en sens inverse Range – Détection canal horizontal, achat bas / vente haut Trailing Stop – Dès +300 points, SL remonte automatiquement Anti-drawdown – Pause auto
Informations sur le projet
Budget
30 - 200 USD