Şartname
import MetaTrader5 as mt5
import datetime
import time
# Configure your trading symbols and parameters
TRADING_SYMBOLS = ["EURUSD", "USDJPY"]
TRADE_VOLUME = 0.1
STOP_LOSS = 50 # in points
TAKE_PROFIT = 100 # in points
# Initialize connection to MetaTrader 5
if not mt5.initialize():
print("Initialize() failed:", mt5.last_error())
quit()
def get_current_symbols():
now = datetime.datetime.now()
# If it's Saturday or Sunday between 9am and 9pm, only trade EUR/USD and USD/JPY
if now.weekday() == 5 or now.weekday() == 6: # Saturday = 5, Sunday = 6
if 9 <= now.hour < 21:
return ["EURUSD", "USDJPY"]
return TRADING_SYMBOLS
def get_position(symbol):
positions = mt5.positions_get(symbol=symbol)
return positions[0] if positions else None
def close_position(position):
order_type = mt5.ORDER_TYPE_SELL if position.type == mt5.ORDER_TYPE_BUY else mt5.ORDER_TYPE_BUY
close_request = {
"action": mt5.TRADE_ACTION_DEAL,
"symbol": position.symbol,
"volume": position.volume,
"type": order_type,
"position": position.ticket,
"price": mt5.symbol_info_tick(position.symbol).bid if order_type == mt5.ORDER_TYPE_BUY else mt5.symbol_info_tick(position.symbol).ask,
"deviation": 20,
"magic": 123456,
"comment": "Auto close loss",
"type_time": mt5.ORDER_TIME_GTC,
"type_filling": mt5.ORDER_FILLING_IOC,
}
result = mt5.order_send(close_request)
return result
def open_trade(symbol, order_type):
price = mt5.symbol_info_tick(symbol).ask if order_type == mt5.ORDER_TYPE_BUY else mt5.symbol_info_tick(symbol).bid
sl = price - STOP_LOSS * 0.0001 if order_type == mt5.ORDER_TYPE_BUY else price + STOP_LOSS * 0.0001
tp = price + TAKE_PROFIT * 0.0001 if order_type == mt5.ORDER_TYPE_BUY else price - TAKE_PROFIT * 0.0001
request = {
"action": mt5.TRADE_ACTION_DEAL,
"symbol": symbol,
"volume": TRADE_VOLUME,
"type": order_type,
"price": price,
"sl": sl,
"tp": tp,
"deviation": 20,
"magic": 123456,
"comment": "Auto trade",
"type_time": mt5.ORDER_TIME_GTC,
"type_filling": mt5.ORDER_FILLING_IOC,
}
result = mt5.order_send(request)
return result
def simple_strategy(symbol):
# Simple logic: open buy if price is above 50-MA
rates = mt5.copy_rates_from_pos(symbol, mt5.TIMEFRAME_M5, 0, 100)
if rates is None or len(rates) < 50:
return
closes = [bar.close for bar in rates]
ma50 = sum(closes[-50:]) / 50
last_close = closes[-1]
position = get_position(symbol)
if position:
# Close if loss is more than X points
profit = position.profit
if profit < -10: # Close if loss is more than $10
print(f"Closing loss on {symbol}")
close_position(position)
else:
if last_close > ma50:
print(f"Opening BUY trade for {symbol}")
open_trade(symbol, mt5.ORDER_TYPE_BUY)
elif last_close < ma50:
print(f"Opening SELL trade for {symbol}")
open_trade(symbol, mt5.ORDER_TYPE_SELL)
def main_loop():
try:
while True:
symbols = get_current_symbols()
for symbol in symbols:
simple_strategy(symbol)
time.sleep(60) # Wait 1 minute before checking again
except KeyboardInterrupt:
print("Bot stopped by user.")
finally:
mt5.shutdown()
if __name__ == "__main__":
main_loop()
Yanıtlandı
1
Derecelendirme
Projeler
556
41%
Arabuluculuk
30
57%
/
3%
Süresi dolmuş
57
10%
Serbest
Yayınlandı: 11 kod
2
Derecelendirme
Projeler
403
28%
Arabuluculuk
40
40%
/
50%
Süresi dolmuş
1
0%
Serbest
3
Derecelendirme
Projeler
515
19%
Arabuluculuk
35
46%
/
31%
Süresi dolmuş
34
7%
Çalışıyor
4
Derecelendirme
Projeler
27
7%
Arabuluculuk
9
33%
/
33%
Süresi dolmuş
1
4%
Çalışıyor
5
Derecelendirme
Projeler
462
26%
Arabuluculuk
139
20%
/
60%
Süresi dolmuş
100
22%
Serbest
6
Derecelendirme
Projeler
15
20%
Arabuluculuk
1
100%
/
0%
Süresi dolmuş
0
Serbest
7
Derecelendirme
Projeler
2
0%
Arabuluculuk
4
25%
/
50%
Süresi dolmuş
1
50%
Serbest
8
Derecelendirme
Projeler
3
33%
Arabuluculuk
2
0%
/
100%
Süresi dolmuş
0
Serbest
9
Derecelendirme
Projeler
9
22%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
10
Derecelendirme
Projeler
36
33%
Arabuluculuk
5
0%
/
80%
Süresi dolmuş
0
Çalışıyor
Yayınlandı: 2 kod
11
Derecelendirme
Projeler
568
35%
Arabuluculuk
82
30%
/
45%
Süresi dolmuş
206
36%
Çalışıyor
12
Derecelendirme
Projeler
246
74%
Arabuluculuk
7
100%
/
0%
Süresi dolmuş
1
0%
Serbest
Yayınlandı: 1 makale
13
Derecelendirme
Projeler
3
0%
Arabuluculuk
1
100%
/
0%
Süresi dolmuş
0
Serbest
Benzer siparişler
MT5 EA DEVELOPMENT SPECIFICATION CHANNEL + RSI REVERSAL STRATEGY I need a professional MetaTrader 5 Expert Advisor based on the following exact strategy. 1. Core Strategy The EA must automatically identify a valid price channel using confirmed swing highs and swing lows. The strategy trades reversals from the channel extremes: SELL: Upper channel + RSI above 70 + bearish rejection. BUY: Lower channel + RSI below 40 +
Hi, I have an existing MQL5 EA of around 18,000 lines that I would like you to review. It has two entry systems (Main + Scalper), many filters/parameters, risk management, and prop-firm functionality. The EA is already working, but I am struggling with optimization and obtaining robust backtest statistics. I would like to send you the complete source code so you can first review the architecture, strategy logic
Senior MQL5 Developer Required — XAUUSD & BTCUSD Algorithmic EA I am looking for an experienced MQL5 developer to design and build a robust MT5 Expert Advisor for XAUUSD (Gold) and BTCUSD . This is not a request for a basic RSI/EMA EA, martingale, grid, or recovery system . I want a properly engineered algorithmic trading system with a demonstrable trading rationale, robust risk management, reliable execution and
Project: Forex EA — EURUSD, Automating My Own Strategy Summary I currently trade EURUSD manually using my own tested strategy and am looking for an experienced MQL5 developer to automate it as an Expert Advisor (EA) for MetaTrader 5. What the bot should do Instrument: EURUSD Determine entry signals using multiple timeframes (higher timeframe for direction/trend, lower timeframe for precise entry timing) Place orders
Ai sadick
30+ USD
Fully automated entry and exit of trades. Identify market trends using price action and reliable technical indicators. Trade major Forex pairs and XAU/USD (Gold). Automatic Stop Loss and Take Profit on every trade. Adjustable risk management, with default risk of 1% per trade. Maximum daily loss protection to stop trading after a specified loss. Break-even and trailing-stop functions. Adjustable lot size, risk %
Hello there, I am looking for a automated strategy for ninjatrader 5 Looking for a proven profit factor of 1.5 ( minimum ) on 15 mins time frame . I do MNQ futures I do not have the logic, but I like mean reverssion variable , plus RSI etc . that could make the automated tool robust and long lasting. i need fast response if you have
Date:29.08.2026 **TECHNICAL SPECIFICATIONS** PDF Attached for reference rest all details given below. Required: Creation, Integration and successful execution of trading algo/robot in MT5 using MT5 VPS. Brokers: Trades to be executed in both brokers Swissquote and Pepperstone. Symbols: All available in MT5. ** Common parameters for all executions: · Manual Start/Stop. · Session time (defined / always
ZONDII Scalpers
30+ USD
I need an Expert Advisor called ZONDII Scalpers for MT5 (MQL5). Timeframe: M5 Pairs: XAUUSD / EURUSD BUY when: Price > EMA200 and EMA50 crosses above EMA200 and RSI(14) > 50 SELL when: Price < EMA200 and EMA50 crosses below EMA200 and RSI(14) < 50 Risk: Fixed lot 0.01, SL 300 points, TP 600 points, Trailing start 200 points / step 100 points. Filter: Max spread 30 points. Only 1 trade at a time. Inputs must be
High-performance XAUUSD MT5 EA - 3 Month Target
30 - 200 USD
I am looking for a professional MT5 EA developer to build a high-performance trading bot specifically for XAUUSD (Gold). My target is approximately 200% return within 3 months, while keeping the drawdown and risk as controlled as reasonably possible. Requirements: MT5 Expert Advisor (EA) XAUUSD only Fully automated trading Clear risk management Stop Loss and Take Profit on trades No martingale or grid strategy unless
Professional MT5 Gold (XAUUSD) Scalping EA
30 - 200 USD
Hello, I’m looking for an experienced MT5 developer to build a professional Expert Advisor (EA) for trading Gold (XAUUSD). My requirements: Platform: MT5 Instrument: XAUUSD (Gold) Fully automatic trading Both BUY and SELL trades Adjustable lot size Stop Loss and Take Profit Trailing Stop / Break Even Daily maximum loss limit Maximum drawdown protection Maximum number of open trades Trading hours/session filter Spread
Proje bilgisi
Bütçe
50 - 200 USD
Son teslim tarihi
from 7 to 10 gün