Spécifications

//+------------------------------------------------------------------+
//| 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);
}

Répondu

1
Développeur 1
Évaluation
(634)
Projets
1003
47%
Arbitrage
33
36% / 36%
En retard
98
10%
Travail
Publié : 6 codes
2
Développeur 2
Évaluation
(107)
Projets
175
25%
Arbitrage
23
13% / 78%
En retard
16
9%
Travail
3
Développeur 3
Évaluation
(1)
Projets
0
0%
Arbitrage
2
0% / 100%
En retard
0
Gratuit
4
Développeur 4
Évaluation
(274)
Projets
403
28%
Arbitrage
40
40% / 50%
En retard
1
0%
Gratuit
5
Développeur 5
Évaluation
(2)
Projets
1
0%
Arbitrage
1
0% / 100%
En retard
0
Gratuit
6
Développeur 6
Évaluation
(10)
Projets
12
0%
Arbitrage
3
33% / 33%
En retard
1
8%
Gratuit
7
Développeur 7
Évaluation
Projets
2
0%
Arbitrage
4
25% / 50%
En retard
1
50%
Gratuit
8
Développeur 8
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
9
Développeur 9
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
10
Développeur 10
Évaluation
(33)
Projets
36
33%
Arbitrage
5
0% / 80%
En retard
0
Travail
Publié : 2 codes
11
Développeur 11
Évaluation
(258)
Projets
265
29%
Arbitrage
0
En retard
3
1%
Travail
Publié : 2 codes
12
Développeur 12
Évaluation
(1)
Projets
0
0%
Arbitrage
1
0% / 100%
En retard
0
Gratuit
13
Développeur 13
Évaluation
(4)
Projets
3
33%
Arbitrage
2
0% / 100%
En retard
0
Gratuit
14
Développeur 14
Évaluation
(20)
Projets
27
30%
Arbitrage
4
50% / 25%
En retard
4
15%
Chargé
15
Développeur 15
Évaluation
(1)
Projets
0
0%
Arbitrage
5
0% / 80%
En retard
0
Gratuit
16
Développeur 16
Évaluation
(131)
Projets
171
39%
Arbitrage
10
40% / 10%
En retard
31
18%
Travail
17
Développeur 17
Évaluation
(5)
Projets
8
13%
Arbitrage
3
0% / 33%
En retard
2
25%
Gratuit
Publié : 1 code
18
Développeur 18
Évaluation
(4)
Projets
8
0%
Arbitrage
3
33% / 67%
En retard
4
50%
Gratuit
19
Développeur 19
Évaluation
(3)
Projets
1
100%
Arbitrage
3
0% / 100%
En retard
0
Gratuit
20
Développeur 20
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
21
Développeur 21
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
22
Développeur 22
Évaluation
(40)
Projets
45
60%
Arbitrage
2
100% / 0%
En retard
1
2%
Gratuit
Publié : 5 codes
Commandes similaires
Expert Advisor (EA) Requirements – MT5 (MQL5) Project Overview Develop an automated Expert Advisor (EA) for MetaTrader 5 based on EMA crossover signals combined with strict risk management and trade management principles. The EA must be optimized for Forex pairs and indices and should operate automatically without manual intervention. Entry Conditions Buy Setup Fast EMA crosses above Slow EMA. Current candle closes
Hi everyone, I need a custom automation tool (can be developed using Python automation, a Chrome extension, or other web automation scripts) to help me batch-export screenshots of trading charts for backtesting. Context: I already have a completed Pine Script indicator. Once loaded onto the TradingView chart, it plots signal marks (such as specific icons or arrows) directly on the screen. The "signals" or "marks"
MC Trader's 30+ USD
If Buy: it must Buy when a conformation is done Bye the candle that would be a bullish engolfing candle or after liqudity swip or when sellers has stepped down the market and the market regains energy and trand upwards, it's stop loss must be below the Buy position and it's take profit must be at the top of all candles
i am looking to upgrade my trading telegram bot and add live data to it and also make it linked to a dashboard where i can trace the users who register in my bot and pay and make them go in my private channel and manages the expiry date of each user
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
O EA deve operar - na corretora BINANCE - com duas médias móveis que podem ser aritmética, exponencial, ponderada, alma( Alnaud Legoux ), Jurik. O EA fica comprado quando a primeira média (rápida) cruzar a segunda média ( lenta ) para cima e vendido quando a primeira média cruzar a segunda média para baixo. Cada entrada deve ser zerada por stop loss, stop gain ou na virada de mão
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
I have a EA for XAUUSD which works awesome in sideways and trending market as well, capital requirement is only 2000USd and weekly profit is around 1500-2000 USD. I am using this bot from 3 months and getting continuous good result
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

Informations sur le projet

Budget
30 - 500 USD