Spécifications

//+------------------------------------------------------------------+
//| Simple Robo Trader MT5 |
//| Works on any pair & timeframe |
//+------------------------------------------------------------------+
#property strict

// Input settings
input double LotSize = 0.01;
input int FastMA = 10;
input int SlowMA = 30;
input int RSIPeriod = 14;
input int StopLoss = 200; // in points
input int TakeProfit = 400;// in points

// Indicator handles
int fastMAHandle;
int slowMAHandle;
int rsiHandle;

//+------------------------------------------------------------------+
int OnInit()
{
   fastMAHandle = iMA(_Symbol, _Period, FastMA, 0, MODE_EMA, PRICE_CLOSE);
   slowMAHandle = iMA(_Symbol, _Period, SlowMA, 0, MODE_EMA, PRICE_CLOSE);
   rsiHandle = iRSI(_Symbol, _Period, RSIPeriod, PRICE_CLOSE);

   return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
void OnTick()
{
   if(PositionsTotal() > 0) return;

   double fastMA[2], slowMA[2], rsi[1];

   CopyBuffer(fastMAHandle, 0, 0, 2, fastMA);
   CopyBuffer(slowMAHandle, 0, 0, 2, slowMA);
   CopyBuffer(rsiHandle, 0, 0, 1, rsi);

   // BUY Condition
   if(fastMA[1] < slowMA[1] && fastMA[0] > slowMA[0] && rsi[0] > 50)
   {
      BuyTrade();
   }

   // SELL Condition
   if(fastMA[1] > slowMA[1] && fastMA[0] < slowMA[0] && rsi[0] < 50)
   {
      SellTrade();
   }
}

//+------------------------------------------------------------------+
void BuyTrade()
{
   double price = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
   double sl = price - StopLoss * _Point;
   double tp = price + TakeProfit * _Point;

   MqlTradeRequest req;
   MqlTradeResult res;

   ZeroMemory(req);

   req.action = TRADE_ACTION_DEAL;
   req.symbol = _Symbol;
   req.volume = LotSize;
   req.type = ORDER_TYPE_BUY;
   req.price = price;
   req.sl = sl;
   req.tp = tp;
   req.deviation = 10;

   OrderSend(req, res);
}

//+------------------------------------------------------------------+
void SellTrade()
{
   double price = SymbolInfoDouble(_Symbol, SYMBOL_BID);
   double sl = price + StopLoss * _Point;
   double tp = price - TakeProfit * _Point;

   MqlTradeRequest req;
   MqlTradeResult res;

   ZeroMemory(req);

   req.action = TRADE_ACTION_DEAL;
   req.symbol = _Symbol;
   req.volume = LotSize;
   req.type = ORDER_TYPE_SELL;
   req.price = price;
   req.sl = sl;
   req.tp = tp;
   req.deviation = 10;

   OrderSend(req, res);
}

Répondu

1
Développeur 1
Évaluation
(7)
Projets
9
0%
Arbitrage
2
0% / 100%
En retard
0
Gratuit
2
Développeur 2
Évaluation
(64)
Projets
144
46%
Arbitrage
19
42% / 16%
En retard
32
22%
Travail
3
Développeur 3
Évaluation
(4)
Projets
3
33%
Arbitrage
2
0% / 100%
En retard
0
Gratuit
4
Développeur 4
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
5
Développeur 5
Évaluation
(3)
Projets
1
100%
Arbitrage
3
0% / 100%
En retard
0
Gratuit
6
Développeur 6
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
7
Développeur 7
Évaluation
(331)
Projets
397
53%
Arbitrage
20
55% / 15%
En retard
29
7%
Occupé
8
Développeur 8
Évaluation
Projets
0
0%
Arbitrage
1
0% / 100%
En retard
0
Gratuit
9
Développeur 9
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
10
Développeur 10
Évaluation
Projets
0
0%
Arbitrage
1
0% / 0%
En retard
0
Travail
Commandes similaires
I am looking for an experienced MQL5 developer to convert a complex TradingView Pine Script (will provide the script from tradingview) into a fully automated MT5 Expert Advisor -bot. The TradingView script includes: Market Structure (BOS, CHoCH, Swing BOS) Strong / Weak High & Low Equilibrium (Premium / Discount zones) Volumetric Order Blocks Fair Value Gaps (FVG / VI / OG) Accumulation & Distribution zones Equal
// Add this to your EA after ExportState() function void SendToBase44(const string state, const string dir, double entry, double sl, double tp) { string url = " https://preview-sandbox--ee0a32a725b788974de435e8cef40b7a.base44.app/api/functions/receiveEAState "; string headers = "Content-Type: application/json\r\n"; string json = "{" "\"symbol\":\""+_Symbol+"\","
1.Sinyal Perdagangan : Sinyal beli: garis MACD utama memotong garis sinyal ke atas (macd_current>signal_current && macd_previous<signal_previous). Sinyal jual: garis MACD utama memotong garis sinyal ke bawah (macd_current<signal_current && macd_previous>signal_previous). Gambar di bawah menunjukkan kasus beli dan jual. 2. Posisi ditutup pada sinyal yang berlawanan: Posisi beli ditutup pada sinyal jual, dan posisi

Informations sur le projet

Budget
40 - 10000 USD

Client

Commandes passées1
Nombre d'arbitrages0