CEESCALPTOR

Spezifikation

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()

Bewerbungen

1
Entwickler 1
Bewertung
(392)
Projekte
544
40%
Schlichtung
30
57% / 3%
Frist nicht eingehalten
57
10%
Frei
Veröffentlicht: 11 Beispiele
2
Entwickler 2
Bewertung
(269)
Projekte
397
27%
Schlichtung
38
39% / 50%
Frist nicht eingehalten
1
0%
Arbeitet
3
Entwickler 3
Bewertung
(321)
Projekte
499
19%
Schlichtung
33
42% / 30%
Frist nicht eingehalten
32
6%
Überlastet
4
Entwickler 4
Bewertung
(17)
Projekte
21
10%
Schlichtung
5
40% / 40%
Frist nicht eingehalten
1
5%
Beschäftigt
5
Entwickler 5
Bewertung
(250)
Projekte
460
26%
Schlichtung
140
20% / 59%
Frist nicht eingehalten
100
22%
Arbeitet
6
Entwickler 6
Bewertung
(14)
Projekte
14
21%
Schlichtung
0
Frist nicht eingehalten
0
Frei
7
Entwickler 7
Bewertung
Projekte
2
0%
Schlichtung
4
25% / 50%
Frist nicht eingehalten
1
50%
Frei
8
Entwickler 8
Bewertung
(4)
Projekte
3
33%
Schlichtung
2
0% / 100%
Frist nicht eingehalten
0
Frei
9
Entwickler 9
Bewertung
(8)
Projekte
9
22%
Schlichtung
0
Frist nicht eingehalten
0
Frei
10
Entwickler 10
Bewertung
(32)
Projekte
35
34%
Schlichtung
5
0% / 80%
Frist nicht eingehalten
0
Arbeitet
Veröffentlicht: 2 Beispiele
11
Entwickler 11
Bewertung
(305)
Projekte
548
35%
Schlichtung
79
32% / 42%
Frist nicht eingehalten
197
36%
Beschäftigt
12
Entwickler 12
Bewertung
(77)
Projekte
241
73%
Schlichtung
7
100% / 0%
Frist nicht eingehalten
1
0%
Frei
13
Entwickler 13
Bewertung
(2)
Projekte
3
0%
Schlichtung
1
100% / 0%
Frist nicht eingehalten
0
Frei
Ähnliche Aufträge
My EA, based on the Ultimate Renko indicator created by Artur Zas, is no longer working. I am not sure if it's my computer or the latest version of MetaTrader, but I need help running the EA (16 errors need to be corrected). I will send you the EA source code, and after corrections, you will send me the corrected source code. Please do not apply if you do not have the package (Renko-GenX) and the UltimateRenko
EA Development mentor 30 - 40 USD
am looking for a Mentor that has verifiable experience trading forex and commodities. Somebody who has a couple years experience in failures and successes. I am not a beginner. I have modest success already with discretionary trading. I have had an EA created that is very promising. It has extensive testing with very good results. The idea would be to work together advancing the existing EA and build additional EA's
Existing EA 30 USD
I’m looking to acquire an existing, profitable Expert Advisor (EA) with full source code to add to our client investment portfolio. To be clear, this is not a request to develop or design a new strategy. If you already have an EA that is proven, consistent, and production-ready, I’m open to reviewing it immediately. Please apply only if you meet all the requirements below. Submissions without a proper introduction or
Need to create an MT5 EA based on break out strategy. This will be all in one EA including daily breakout, hourly breakout, support and resistance breakout, pivot breakout, super trend break out, moving average breakout. Extra features include TP, SL, breakeven, notifications, dashboard
Looking for an MT5 developer to build an automated trading bot that executes trades based on indicator signals. The bot should support flexible inputs, work across Forex, commodities, and crypto, and allow basic configuration options. If you're experienced with MT5 EAs and indicator integration, please reach out
🔹 Project Description I need a very simple MT4 (MQL4) Expert Advisor to be used on a DEMO account . Main Purpose: When enabled, the EA must prevent opening any NEW trades , while allowing existing open trades to be managed and closed normally . Required Behavior: Do NOT close any open trades. Do NOT modify TP or SL. Prevent opening of: New initial trades New trade cycles Existing trades must continue until they
Salom, Menda allaqachon ishlaydigan MQL5 ekspert maslahatchisi bor . EA to'liq ishlaydi , savdolarni to'g'ri ochadi va boshqaradi hamda qat'iy qoidalarga asoslangan mantiqqa amal qiladi . Men noldan yangi EA yaratmoqchi emasman . 🔹 Allaqachon bajarilgan ishlar: EA MQL5 da yozilgan Strategiya mantig'i to'liq va barqaror Kundalik zona mantig'i to'g'ri ishlaydi Keyingi M5 shamida yozuv bajariladi O'zgartirish (teskari)
I want a reliable and broker-independent copy-trading solution that copies trades from a master MT5 account to multiple MT4 and/or MT5 client accounts. The system is designed for stable live trading and works with any broker, handling common differences in symbols, pricing, and execution. The copier supports full trade synchronization, including trade opening, closing, partial closes, and SL/TP modifications, with
PAIR : EURUSD ONLY TIMEFRAME: M1 SESSION:LONDON SESSION ONLY(CONFIGURABLE START / END TIME) TREND FILTER: - USE VWAP AS MAIN TREND FILTER - BUY ONLY WHEN PRICE IS ABOVE VWAP - SELL ONLY WHEN PRICEIS IS BELLOW VWAP STRUCTURE CONDITION : - TRADE ONLY AFTER A VALID BOS (BREAK OF STRUCTURE) - BOS MUST BE IN THE SAME DIRECTION AS VWAP TREND -IGNORE COUNTER-TREND BOS ENTERY CONDITION (ORDER BLOCK ): - AFTER BOS , WAIT FOR
I am looking for an experienced developer to create an automated trading bot on the Quantower platform based on my trading rules. The bot should execute trades automatically. Kindly bid for it if it is what you can code for me

Projektdetails

Budget
50 - 200 USD
Ausführungsfristen
von 7 bis 10 Tag(e)