Specification

//+------------------------------------------------------------------+
//| ScalperEA.mq5 |
//+------------------------------------------------------------------+
#property copyright "Template"
#property version "1.00"
#property strict

input int FastEMA = 8;
input int SlowEMA = 21;
input int AtrPeriod = 14;
input double StopAtrMult = 1.2;
input double TpAtrMult = 1.0;
input double RiskPercent = 0.5; // percent account risk per trade
input int Magic = 123456;
input double Lots = 0.01;

double EMAFast[], EMASlow[], ATRArr[];

int OnInit()
{
  SetIndexBuffer(0, EMAFast);
  SetIndexBuffer(1, EMASlow);
  // nothing to set for ATR; we'll compute using iATR
  return(INIT_SUCCEEDED);
}

void OnTick()
{
  // get last two closed candles
  int shift = 1; // last closed bar
  double fast_prev = iMA(NULL, PERIOD_CURRENT, FastEMA, 0, MODE_EMA, PRICE_CLOSE, shift+1);
  double fast_last = iMA(NULL, PERIOD_CURRENT, FastEMA, 0, MODE_EMA, PRICE_CLOSE, shift);
  double slow_prev = iMA(NULL, PERIOD_CURRENT, SlowEMA, 0, MODE_EMA, PRICE_CLOSE, shift+1);
  double slow_last = iMA(NULL, PERIOD_CURRENT, SlowEMA, 0, MODE_EMA, PRICE_CLOSE, shift);
  double atr = iATR(NULL, PERIOD_CURRENT, AtrPeriod, shift);

  if (atr <= 0) return;

  // simple crossover signals
  if (fast_prev <= slow_prev && fast_last > slow_last)
  {
    // buy signal
    double entry = SymbolInfoDouble(_Symbol, SYMBOL_BID); // or use Ask for buy market entry
    double stop = entry - StopAtrMult * atr;
    double tp = entry + TpAtrMult * atr;
    double lots = Lots;
    // optionally compute lots from RiskPercent and stop distance
    // place market buy
    trade_buy(lots, stop, tp);
  }
  else if (fast_prev >= slow_prev && fast_last < slow_last)
  {
    // sell signal
    double entry = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
    double stop = entry + StopAtrMult * atr;
    double tp = entry - TpAtrMult * atr;
    trade_sell(Lots, stop, tp);
  }
}

void trade_buy(double lots, double stop, double tp)
{
  MqlTradeRequest req;
  MqlTradeResult res;
  ZeroMemory(req);
  req.action = TRADE_ACTION_DEAL;
  req.symbol = _Symbol;
  req.volume = lots;
  req.type = ORDER_TYPE_BUY;
  req.price = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
  req.sl = stop;
  req.tp = tp;
  req.deviation = 5;
  req.magic = Magic;
  OrderSend(req, res);
}

void trade_sell(double lots, double stop, double tp)
{
  MqlTradeRequest req;
  MqlTradeResult res;
  ZeroMemory(req);
  req.action = TRADE_ACTION_DEAL;
  req.symbol = _Symbol;
  req.volume = lots;
  req.type = ORDER_TYPE_SELL;
  req.price = SymbolInfoDouble(_Symbol, SYMBOL_BID);
  req.sl = stop;
  req.tp = tp;
  req.deviation = 5;
  req.magic = Magic;
  OrderSend(req, res);
}

Responded

1
Developer 1
Rating
(634)
Projects
1003
47%
Arbitration
33
36% / 36%
Overdue
98
10%
Working
Published: 6 codes
2
Developer 2
Rating
(107)
Projects
175
25%
Arbitration
23
13% / 78%
Overdue
16
9%
Working
3
Developer 3
Rating
(1)
Projects
0
0%
Arbitration
2
0% / 100%
Overdue
0
Free
4
Developer 4
Rating
(274)
Projects
403
28%
Arbitration
40
40% / 50%
Overdue
1
0%
Free
5
Developer 5
Rating
(2)
Projects
1
0%
Arbitration
1
0% / 100%
Overdue
0
Free
6
Developer 6
Rating
(10)
Projects
12
0%
Arbitration
3
33% / 33%
Overdue
1
8%
Free
7
Developer 7
Rating
Projects
2
0%
Arbitration
4
25% / 50%
Overdue
1
50%
Free
8
Developer 8
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
9
Developer 9
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
10
Developer 10
Rating
(33)
Projects
36
33%
Arbitration
5
0% / 80%
Overdue
0
Working
Published: 2 codes
11
Developer 11
Rating
(258)
Projects
265
29%
Arbitration
0
Overdue
3
1%
Working
Published: 2 codes
12
Developer 12
Rating
(1)
Projects
0
0%
Arbitration
1
0% / 100%
Overdue
0
Free
13
Developer 13
Rating
(4)
Projects
3
33%
Arbitration
2
0% / 100%
Overdue
0
Free
14
Developer 14
Rating
(20)
Projects
27
30%
Arbitration
4
50% / 25%
Overdue
4
15%
Loaded
15
Developer 15
Rating
(1)
Projects
0
0%
Arbitration
5
0% / 80%
Overdue
0
Free
16
Developer 16
Rating
(131)
Projects
171
39%
Arbitration
10
40% / 10%
Overdue
31
18%
Working
17
Developer 17
Rating
(5)
Projects
8
13%
Arbitration
3
0% / 33%
Overdue
2
25%
Free
Published: 1 code
18
Developer 18
Rating
(4)
Projects
8
0%
Arbitration
3
33% / 67%
Overdue
4
50%
Free
19
Developer 19
Rating
(3)
Projects
1
100%
Arbitration
3
0% / 100%
Overdue
0
Free
20
Developer 20
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
21
Developer 21
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
22
Developer 22
Rating
(40)
Projects
45
60%
Arbitration
2
100% / 0%
Overdue
1
2%
Free
Published: 5 codes
Similar orders
🔍 Strategy Logic 📌 Indicators Used 21 EMA RSI (Upper Level: 61, Lower Level: 39 – Customizable) 📈 Buy Side Setup (Long Entry) Step 1 – Trend Confirmation A Green candle must close above 21 EMA. Step 2 – Pattern Formation After the green candle, observe next 4 candles. At least one Red candle must form (opposite candle). That Red candle must also close above EMA. Step 3 – Key Level Marking Mark the High of the Red
Title Professional AI Automation Trading Bot for Forex & Crypto Solution Language Python (preferred) or MQL5 depending on integration requirements. Categories Expert Advisor (EA) for MetaTrader 5 Automated trading strategies AI/ML-based signal generation Risk management automation Required Skills Strong knowledge of MQL5/Python Experience with MetaTrader API integration Machine learning model deployment
I need an Ai trading bot for Binance and BTC on MT5 that also uses order flow data. It should also make use of TSI- Temporal indicator sampling and also it should make use of fundamental analysis in the process of signal generation
Title: MT5 Forex Trading Robot Development I need a MetaTrader 5 (MT5) Expert Advisor (EA) for automated Forex trading. Requirements: 1. The robot must be fully automated and capable of opening and closing trades without manual intervention. 2. Compatible with MetaTrader 5 (MT5). 3. Adjustable lot size, Stop Loss, and Take Profit settings. 4. Built-in risk management based on account balance. 5. Ability to trade

Project information

Budget
30 - 500 USD