MQL5
Indicators
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
Specification
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
Responded
1
Rating
Projects
7
0%
Arbitration
8
13%
/
75%
Overdue
3
43%
Free
2
Rating
Projects
39
23%
Arbitration
14
0%
/
93%
Overdue
4
10%
Free
3
Rating
Projects
478
40%
Arbitration
105
40%
/
24%
Overdue
82
17%
Loaded
Published: 2 codes
4
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
5
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Published: 8 codes
6
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Similar orders
Youssouf Gold Trader Bot (YGT Bot)
500+ USD
Je souhaite développer un robot de trading automatique avec les exigences suivantes : 1. Marchés : principalement XAUUSD (Gold), avec possibilité d’ajouter EURUSD par la suite. 2. Plateforme : MetaTrader 5 (MT5). 3. Type de trading : le robot doit pouvoir ouvrir automatiquement des positions BUY et SELL selon les conditions de la stratégie. 4. Analyse : utiliser la tendance, les supports/résistances et les
//+------------------------------------------------------------------+ //| Gold_Grid_Secure.mq5 | //| Stratégie GRID SÉCURISÉE pour XAUUSDm | //+------------------------------------------------------------------+ #property strict //--- INPUTS PARAMÈTRES SÉCURISÉS input double LotDepart = 0.01; // Lot de départ input double GridStep = 1000; // Écart entre trades = 1000 points = 10$ sur or input int MaxTrades = 8; //
Golden boy
30+ USD
Je veux un bot qui achèteras et vendras au moment précis( qu’il trouvera bon) pour me permettre de miser peu et d’avoir plus gains.j’ai joins deux images prenez exemple sur la vente pour pouvoir améliorer le bot et j’aimerais qu’il soit facile à manier que même en dormons il ouvre des ordres et les fermes avant les pertes
Project information
Budget
30 - 200 USD