I Need This Killer Strategy To Be Turned Into An EA

Tarea técnica

//+------------------------------------------------------------------+
//| Moving Average Crossover EA for MT5 |
//+------------------------------------------------------------------+
#include <Trade\Trade.mqh>
CTrade trade;

input int FastMAPeriod = 50;
input int SlowMAPeriod = 200;
input int StopLossPips = 50;
input int TakeProfitPips = 100;
input double RiskPercent = 2.0;

double lotSize;

//+------------------------------------------------------------------+
//| Calculate lot size based on 2% risk |
//+------------------------------------------------------------------+
double CalculateLotSize(double stopLossPoints)
{
   double riskAmount = AccountBalance() * RiskPercent / 100.0;
   double tickValue = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE);
   double tickSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE);
   double point = SymbolInfoDouble(_Symbol, SYMBOL_POINT);
   double contractSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_CONTRACT_SIZE);

   double lossPerLot = stopLossPoints * point * contractSize / tickSize * tickValue;
   return NormalizeDouble(riskAmount / lossPerLot, 2);
}

//+------------------------------------------------------------------+
//| Expert Tick Function |
//+------------------------------------------------------------------+
void OnTick()
{
   // Get the current and previous MAs
   double maFastCurrent = iMA(_Symbol, _Period, FastMAPeriod, 0, MODE_EMA, PRICE_CLOSE, 0);
   double maFastPrevious = iMA(_Symbol, _Period, FastMAPeriod, 0, MODE_EMA, PRICE_CLOSE, 1);

   double maSlowCurrent = iMA(_Symbol, _Period, SlowMAPeriod, 0, MODE_EMA, PRICE_CLOSE, 0);
   double maSlowPrevious = iMA(_Symbol, _Period, SlowMAPeriod, 0, MODE_EMA, PRICE_CLOSE, 1);

   // Check for crossover
   if (maFastPrevious < maSlowPrevious && maFastCurrent > maSlowCurrent) // BUY Signal
   {
      if (PositionSelect(_Symbol) && PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_SELL)
         trade.Close(_Symbol); // Close opposite position

      if (!PositionSelect(_Symbol)) // Only if no open position
      {
         double stopLoss = StopLossPips * _Point;
         double takeProfit = TakeProfitPips * _Point;
         lotSize = CalculateLotSize(StopLossPips * 10); // pip to point conversion

         trade.Buy(lotSize, _Symbol, SymbolInfoDouble(_Symbol, SYMBOL_ASK), stopLoss, takeProfit, "Buy on crossover");
      }
   }
   else if (maFastPrevious > maSlowPrevious && maFastCurrent < maSlowCurrent) // SELL Signal
   {
      if (PositionSelect(_Symbol) && PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY)
         trade.Close(_Symbol); // Close opposite position

      if (!PositionSelect(_Symbol)) // Only if no open position
      {
         double stopLoss = StopLossPips * _Point;
         double takeProfit = TakeProfitPips * _Point;
         lotSize = CalculateLotSize(StopLossPips * 10); // pip to point conversion

         trade.Sell(lotSize, _Symbol, SymbolInfoDouble(_Symbol, SYMBOL_BID), stopLoss, takeProfit, "Sell on crossover");
      }
   }
}

Han respondido

1
Desarrollador 1
Evaluación
(144)
Proyectos
186
41%
Arbitraje
24
58% / 21%
Caducado
13
7%
Libre
2
Desarrollador 2
Evaluación
(19)
Proyectos
23
9%
Arbitraje
6
33% / 50%
Caducado
1
4%
Trabajando
3
Desarrollador 3
Evaluación
(379)
Proyectos
488
24%
Arbitraje
59
54% / 25%
Caducado
55
11%
Trabajando
4
Desarrollador 4
Evaluación
(31)
Proyectos
35
46%
Arbitraje
0
Caducado
0
Libre
Ha publicado: 3 ejemplos
5
Desarrollador 5
Evaluación
(4)
Proyectos
3
33%
Arbitraje
1
0% / 100%
Caducado
0
Libre
6
Desarrollador 6
Evaluación
(273)
Proyectos
401
27%
Arbitraje
40
40% / 50%
Caducado
1
0%
Trabaja
7
Desarrollador 7
Evaluación
(296)
Proyectos
475
40%
Arbitraje
105
40% / 24%
Caducado
80
17%
Ocupado
Ha publicado: 2 ejemplos
8
Desarrollador 8
Evaluación
(206)
Proyectos
333
35%
Arbitraje
66
12% / 58%
Caducado
87
26%
Libre
9
Desarrollador 9
Evaluación
(7)
Proyectos
8
13%
Arbitraje
6
33% / 33%
Caducado
0
Libre
10
Desarrollador 10
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
11
Desarrollador 11
Evaluación
(10)
Proyectos
19
42%
Arbitraje
7
0% / 57%
Caducado
3
16%
Trabaja
12
Desarrollador 12
Evaluación
(7)
Proyectos
11
0%
Arbitraje
4
0% / 100%
Caducado
2
18%
Trabaja
13
Desarrollador 13
Evaluación
(1)
Proyectos
0
0%
Arbitraje
4
0% / 75%
Caducado
0
Libre
14
Desarrollador 14
Evaluación
(16)
Proyectos
35
23%
Arbitraje
4
0% / 50%
Caducado
2
6%
Trabaja
15
Desarrollador 15
Evaluación
(4)
Proyectos
3
0%
Arbitraje
3
33% / 67%
Caducado
1
33%
Libre
16
Desarrollador 16
Evaluación
(47)
Proyectos
67
37%
Arbitraje
5
40% / 40%
Caducado
1
1%
Libre
17
Desarrollador 17
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
18
Desarrollador 18
Evaluación
(6)
Proyectos
5
0%
Arbitraje
3
33% / 33%
Caducado
2
40%
Trabaja
19
Desarrollador 19
Evaluación
(574)
Proyectos
945
47%
Arbitraje
309
58% / 27%
Caducado
125
13%
Libre
Solicitudes similares
i need a developer who can link my EA to AI and in the same time i want to make a crm and a bot for onboarding clients automatically to the telegram channel
I am looking for an experienced MQL5 developer to complete the optimization and structural refinement of an existing MT5 Expert Advisor (source code ~2.5MB). Phase 1 (audit and baseline testing) has already been completed. The remaining work focuses on correcting core system behavior without changing the strategy. Key issues identified: • Scenario gate logic is not correctly structured at the entry decision level •
IF ANYONE IS INTERESTED IN GETTING ANY KIND OF CUSTOM BOT FOR TRADING I WILL ADD THE STRATEGIES ACCORDING TO YOUR CHOICE MINE BEST BOT IS SCALPING AND HEDGING BOT YOU CAN CONTACT ME FOR SERVICES
I trade ES futures on the Ninja trader platform. I recently came across an indicator and wanted to check with you if you can build a similar indicator that works on Orenko or Ninja renko charts, and also combines support and resistance untouched. Below is the indicator, which will tell you market chop and to avoid. I want to include a support and resistance bar on the chart when there is no chop please let me know
Project Description: I have a fully working Pine Script for TradingView called MFHA 3-Step Market Structure Strategy V2 . I need it converted into MT5 , with the logic kept as close to the Pine version as possible. What I need: MT5 Indicator Exact oscillator logic Multi-timeframe logic using 4H, 15M, and 1M EMA filter MTF EMA dashboard RSI display Buy and sell visual signals Background state/flash behavior where
I am looking for an experienced MQL5 developer to continue optimization work on an existing Expert Advisor (MQ5 source file available, 2.5MB). Important: This is NOT a project to build a new EA. The task is strictly to refine and improve the current system while keeping the core strategy intact. The EA is already functional and stable. A full code audit and baseline backtesting have already been done, and key
Hello, and please read everything !!! I am looking for a developer who can recreate a strategy similar to an EA I already have. The EA works well on demo, especially during specific volatility windows (for example DE40 between 09:00 and 10:00 Frankfurt time), but on real accounts it produces constant losses even with IC Markets Raw and VPS close to the broker. 🎯 Objective The goal is to recreate and adapt this
Darwish 50 - 100 USD
I want a bot that runs on any timeframe, but for now, I’ll set it on 1 minute. It should watch for buy and sell signals. Each time it opens a trade, as soon as it makes a small profit like 1, 2, or 3 dollars it closes, then checks for the next signal. If it sees a buy, it buys; if it sees a sell, it sells—just repeating the cycle, over and over, until I stop it
📢 Project Title:MT5 Expert Advisor (EA) – Advanced Renko Strategy (Full Automation) 📄 Project Description:I want to develop a fully automated MT5 Expert Advisor (EA) based on my existing TradingView Renko strategy.I already have a working Pine Script that generates Buy/Sell alerts with ATR and other logic. Now I need the same strategy to be fully converted into MT5 EA with built-in Renko logic (no external
Need trading robot 30 - 100 USD
I need a trading robot specifically for gold (XAUUSD) that follows a high-probability scalping and intraday strategy based on 15-minute candle confirmations. The bot should identify key support and resistance zones, detect breakouts, fake breakouts, and pullbacks before entering trades. It must include entry conditions based on candle patterns such as engulfing and rejection wicks, and optionally fair value gaps

Información sobre el proyecto

Presupuesto
30+ USD