Tarea técnica

// Khai báo các tham số đầu vào
input int rsiPeriod = 14; // Chu kỳ RSI
đầu vào mua gấp đôiLevel = 30,0; // Ngưỡng quá bán RSI để mua
đầu vào bán gấp đôiLevel = 70,0; // Ngưỡng quá mua RSI để bán
đầu vào int movingAveragePeriod = 50; // Chu kỳ trung bình để theo dõi tài khoản
đầu vào rủi ro képPerTrade = 1,0; // Tỷ lệ sai sót của mỗi lệnh (% tài khoản)
input int keyLevelPeriod = 100; // Chu kỳ tìm kiếm key level
đầu vào int TrendLinePeriod = 100; // Chu kỳ tìm đường xu hướng

// Toàn bộ biến cục bộ để theo dõi hiệu suất
double totalProfit = 0;
int totalTrades = 0;
int winningTrades = 0;
int loseTrades = 0;

// Hàm khởi tạo EA
int OnInit() {
    // Khởi tạo các biến hoặc chỉ báo cần thiết
    trả về(INIT_SUCCEEDED);
}

// Hàm chạy mỗi khi có giá mới
void OnTick() {
    // Lấy hiện tại RSI giá trị
    giá trị rsiValue = iRSI(Biểu tượng(), 0, rsiPeriod, GIÁ_ĐÓNG, 0);

    // Lấy động trung giá trị để theo dõi tài khoản
    double movingAverage = iMA(Biểu tượng(), 0, movingAveragePeriod, 0, MODE_SMA, GIÁ_ĐÓNG, 0);

    // Tìm Key Level ( Hỗ trợ/Kháng cự)
    keyLevel kép = FindKeyLevel();

    // Tìm Đường Xu Hướng (Trendline)
    double trendLine = FindTrendLine();

    // Điều kiện Mua
    nếu (rsiValue < buyLevel && Close[0] > movingAverage && Close[0] > keyLevel && trendLine > 0) {
        lotSize đôi = CalculateLotSize();
        if (OrderSend(Symbol(), OP_BUY, lotSize, Ask, 3, 0, 0, "Mua từ EA", 0, 0, Green) > 0) {
            Alert("Lệnh Mua Được Đặt: RSI dưới ", buyLevel," và giá trên MA ", movingAveragePeriod);
            Cập nhật hiệu suất();
        }
    }

    // Điều kiện Bán
    nếu (rsiValue > sellLevel && Đóng[0] < movingAverage && Đóng[0] < keyLevel && trendLine < 0) {
        lotSize đôi = CalculateLotSize();
        if (OrderSend(Symbol(), OP_SELL, lotSize, Bid, 3, 0, 0, "Bán từ EA", 0, 0, Red) > 0) {
            Alert("Lệnh Bán Được Đặt: RSI trên ", sellLevel," và giá dưới MA ", movingAveragePeriod);
            Cập nhật hiệu suất();
        }
    }
}

// Hàm khi EA bị đóng
void OnDeinit(const int lý do) {
    // Dọn dẹp khi EA bị tắt
    Print("Tổng lợi nhuận: ", TotalProfit);
    Print("Tổng số giao dịch: ", TotalTrades);
    Print("Số giao dịch thắng: ", winTrades);
    Print("Số giao dịch thua: ", lossTrades);
    nếu (tổng số giao dịch > 0) {
        Print("Tỷ lệ thắng: ", (double)Số giao dịch thắng / tổng số giao dịch * 100, "%");
    }
}

// Hàm tính toán dựa trên lệnh kích thước trên mỗi lệnh đầy rủi ro
đôi CalculateLotSize() {
    double riskAmount = Số dư tài khoản() * (riskPerTrade / 100);
    gấp đôi kích thước lô = số tiền rủi ro / (100 * Điểm); // Giả sử khả năng cắt là 100 pip
    trả về NormalizeDouble(lotSize, 2);
}

// Hàm cập nhật giao dịch hiệu quả
void Cập nhật hiệu suất() {
    đối với (int i = OrdersHistoryTotal() - 1; i >= 0; i--) {
        nếu (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) {
            nếu (OrderSymbol() == Symbol() && OrderType() <= OP_SELL) {
                lợi nhuận gấp đôi = OrderProfit();
                tổng lợi nhuận += lợi nhuận;
                totalTrades++;
                nếu (lợi nhuận > 0) {
                    giao dịch chiến thắng++;
                } khác {
                    mấtGiao dịch++;
                }
            }
        }
    }
}

// Hàm tìm Key Level (Hỗ trợ đa dạng/kháng cự)
đôi FindKeyLevel() {
    double high = iHigh(Biểu tượng(), 0, iHighest(Biểu tượng(), 0, MODE_HIGH, keyLevelPeriod, 1));
    thấp gấp đôi = iLow(Biểu tượng(), 0, iLowest(Biểu tượng(), 0, MODE_LOW, keyLevelPeriod, 1));
    lợi nhuận (cao + thấp) / 2; // Trung bình giữa cao và thấp được xem là cấp độ chính
}

// Hàm tìm Đường Xu Hướng (Trendline)
đôi FindTrendLine() {
    int bars = trendLinePeriod;
    tổng képX = 0, tổng Y = 0, tổngXY = 0, tổngXX = 0;
    đối với (int i = 0; i < thanh; i++) {
        tổngX += i;
        sumY += Đóng[i];
        sumXY += i * Đóng[i];
        tổngXX += i * i;
    }
    độ dốc kép = (các thanh * tổngXY - tổngX * tổngY) / (các thanh * tổngXX - tổngX * tổngX);
    độ dốc trở lại; // Độ dốc của đường xu hướng, dương là xu hướng tăng, âm là xu hướng giảm
}

Han respondido

1
Desarrollador 1
Evaluación
(280)
Proyectos
351
29%
Arbitraje
37
27% / 65%
Caducado
10
3%
Trabajando
2
Desarrollador 2
Evaluación
Proyectos
1
0%
Arbitraje
4
0% / 50%
Caducado
0
Trabaja
3
Desarrollador 3
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
4
Desarrollador 4
Evaluación
(106)
Proyectos
129
25%
Arbitraje
25
28% / 56%
Caducado
8
6%
Libre
5
Desarrollador 5
Evaluación
(298)
Proyectos
478
40%
Arbitraje
105
40% / 24%
Caducado
82
17%
Trabajando
Ha publicado: 2 ejemplos
Solicitudes similares
C'est un Expert Advisor (EA) MQL5 pour MetaTrader 5, conçu pour l' XAUUSD , combinant un filtre de tendance et une grille adaptative avec gestion de panier ("basket") et protections contre le drawdown. Version 1.00. Logique de trading Filtre de tendance (H4 par défaut) • EMA rapide (50) vs EMA lente (200) pour déterminer la direction (UP/DOWN) • Filtre ADX (période 14, seuil 18) pour éviter de trader en
My EA is semi Auto EA..with Master and slave concept Using Heiken Ashi +Heiken Smooth and Moving Average What to do?1. Remove some previous feature 2.Change some rules of 4 slave to pending Order 3. Check the coding is clean. 4. create panel dialog box
These are orderflow footprint indicator I would like to know if you can algorithmisie and build a stacked imbalance bot from them .. Kindlt let me know if you can do it and check the file before replying me
I have 2 trading view indicators by GainzAlgo that I want code to mt5 , could u advise? I need you to give me response if you can convert This
I currently sell a white-label XAUUSD EA, but the existing supplier owns the source code. I now need a new, independently developed EA and licensing system that my company fully owns and controls. I am not requesting decompilation or copying of proprietary code. Existing settings, presets and trading examples will be provided as reference. The developer must first identify any missing strategy rules before
I DO NOT need any programming or strategy development. I already have a working NinjaTrader 8 automated strategy based on a 3/5 EMA crossover. I need you to run my existing strategy through NinjaTrader Strategy Analyzer/Optimizer, test the existing adjustable parameters, and find robust settings with the best profit factor and lowest reasonable drawdown. I will provide the existing NinjaScript ZIP. I do not want the
I am looking to acquire an EXISTING and PROVEN MetaTrader 5 Expert Advisor. I am NOT looking for someone to develop a random new strategy from scratch. The objective is to find a robust EA with an existing track record, verify its performance and robustness, and purchase the MQL5 source code together with clearly defined commercial rights. MAIN REQUIREMENTS The EA should meet most or all of the following
Looking to acquire an existing, proven EA. Not looking for new strategy development. REQUIREMENTS — non-negotiable: Minimum 12 months verified LIVE history (Myfxbook or MQL5 Signals, real money — not demo, not backtest) Hard stop loss on EVERY trade, set at order placement NO martingale, NO grid, NO averaging into losers, NO lot multiplication after a loss Max historical drawdown under 30% Minimum 5 trades per
Mr quetta 100+ USD
Yes, that is exactly what I need. The bot should not be restricted to a fixed list of currency pairs. It should technically scan all available Quotex pairs in real time and automatically select the pair where the market conditions are strongest. The bot should analyze each pair using multiple confirmations, such as short-term price momentum, trend direction, market structure, support/resistance, candle formation
Hello, I trade on HFM MT5. Need SCALPING EA for scalping, budget $30. SYMBOLS: XAUUSD (GOLD), US30, NAS100, GER40, EURUSD TIMEFRAME: M1 and M5 PLATFORM: MT5, must work on HFM VPS STRATEGY: - EMA 9 crosses EMA 21 - RSI 14: BUY only if RSI >45, SELL only if RSI <55 - Bollinger Bands: Only trade when price returns inside BB after breakout - 1 trade at a time per symbol - SL: 150 points Gold / 100 points indices (must be

Información sobre el proyecto

Presupuesto
30 USD