An expect advisor based on rsi needed

MQL5 Experten

Spezifikation

//+------------------------------------------------------------------+
//| RSI + EMA Strategy with Sessions, MTF, and Trailing SL           |
//|                                    |
//+------------------------------------------------------------------+
#property strict

// === Inputs ===
input int      RSIPeriod       = 14;
input int      EMAPeriod       = 200;
input int      RSIOverbought   = 70;
input int      RSIOversold     = 30;
input double   LotSize         = 0.1;
input int      StopLoss        = 200;    // points
input int      TakeProfit      = 400;    // points
input int      Slippage        = 3;
input int      TSLTrigger      = 100;    // points in profit before trailing
input int      TSLStep         = 50;

input bool     AllowAsianSession   = true;
input bool     AllowLondonSession  = true;
input bool     AllowNewYorkSession = true;

input string   EntryTF         = "M15";
input string   TrendTF         = "H1";

//+------------------------------------------------------------------+
int OnInit() { return INIT_SUCCEEDED; }
//+------------------------------------------------------------------+
void OnTick()
{
   if (!WithinSession()) return;
   if (PositionsTotal() > 0) { ManageTrailingStop(); return; }

   double rsi = iRSIValue(_Symbol, EntryTF, RSIPeriod);
   double ema = iEMAValue(_Symbol, TrendTF, EMAPeriod);
   double price = SymbolInfoDouble(_Symbol, SYMBOL_BID);

   if (rsi < RSIOversold && price > ema)
      OpenOrder(ORDER_TYPE_BUY);

   if (rsi > RSIOverbought && price < ema)
      OpenOrder(ORDER_TYPE_SELL);
}
//+------------------------------------------------------------------+
void OpenOrder(ENUM_ORDER_TYPE type)
{
   double price = (type == ORDER_TYPE_BUY) ? SymbolInfoDouble(_Symbol, SYMBOL_ASK)
                                           : SymbolInfoDouble(_Symbol, SYMBOL_BID);
   double sl = (type == ORDER_TYPE_BUY) ? price - StopLoss * _Point
                                        : price + StopLoss * _Point;
   double tp = (type == ORDER_TYPE_BUY) ? price + TakeProfit * _Point
                                        : price - TakeProfit * _Point;

   MqlTradeRequest request;
   MqlTradeResult result;
   ZeroMemory(request); ZeroMemory(result);

   request.action = TRADE_ACTION_DEAL;
   request.symbol = _Symbol;
   request.volume = LotSize;
   request.type = type;
   request.price = NormalizeDouble(price, _Digits);
   request.sl = NormalizeDouble(sl, _Digits);
   request.tp = NormalizeDouble(tp, _Digits);
   request.deviation = Slippage;
   request.magic = 20250822;
   request.type_filling = ORDER_FILLING_IOC;

   if (OrderSend(request, result) && result.retcode == TRADE_RETCODE_DONE)
   {
      Print("Trade placed: #", result.order);
      LogTrade(result.order, type, price, sl, tp);
   }
   else
   {
      Print("Order failed: ", result.retcode);
   }
}
//+------------------------------------------------------------------+
void ManageTrailingStop()
{
   for (int i = 0; i < PositionsTotal(); i++)
   {
      ulong ticket = PositionGetTicket(i);
      if (PositionSelectByTicket(ticket))
      {
         double entry = PositionGetDouble(POSITION_PRICE_OPEN);
         double sl = PositionGetDouble(POSITION_SL);
         double price = (PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY)
                        ? SymbolInfoDouble(_Symbol, SYMBOL_BID)
                        : SymbolInfoDouble(_Symbol, SYMBOL_ASK);

         double profit = (PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY)
                         ? price - entry
                         : entry - price;

         if (profit / _Point >= TSLTrigger)
         {
            double newSL = (PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY)
                           ? price - TSLStep * _Point
                           : price + TSLStep * _Point;

            if (MathAbs(sl - newSL) > (_Point * 5))
            {
               MqlTradeRequest mod;
               MqlTradeResult res;
               ZeroMemory(mod); ZeroMemory(res);

               mod.action = TRADE_ACTION_SLTP;
               mod.symbol = _Symbol;
               mod.sl = NormalizeDouble(newSL, _Digits);
               mod.tp = PositionGetDouble(POSITION_TP);
               mod.position = ticket;
               if (OrderSend(mod, res))
                  Print("Trailing SL updated for order ", ticket);
            }
         }
      }
   }
}
//+------------------------------------------------------------------+
double iRSIValue(string symbol, string timeframe, int period)
{
   int tf = StringToTimeframe(timeframe);
   return iRSI(symbol, tf, period, PRICE_CLOSE, 0);
}

double iEMAValue(string symbol, string timeframe, int period)
{
   int tf = StringToTimeframe(timeframe);
   return iMA(symbol, tf, period, 0, MODE_EMA, PRICE_CLOSE, 0);
}

int StringToTimeframe(string tf)
{
   if(tf=="M1") return PERIOD_M1;
   if(tf=="M5") return PERIOD_M5;
   if(tf=="M15") return PERIOD_M15;
   if(tf=="M30") return PERIOD_M30;
   if(tf=="H1") return PERIOD_H1;
   if(tf=="H4") return PERIOD_H4;
   if(tf=="D1") return PERIOD_D1;
   return _Period;
}
//+------------------------------------------------------------------+
bool WithinSession()
{
   datetime now = TimeLocal();
   int hour = TimeHour(now);

   bool isAsian  = (hour >= 0 && hour < 8);       // 0–7 GMT
   bool isLondon = (hour >= 8 && hour < 17);      // 8–16 GMT
   bool isNY     = (hour >= 13 && hour < 22);     // 13–21 GMT

   if ((AllowAsianSession && isAsian) ||
       (AllowLondonSession && isLondon) ||
       (AllowNewYorkSession && isNY))
      return true;

   return false;
}
//+------------------------------------------------------------------+
void LogTrade(ulong ticket, ENUM_ORDER_TYPE type, double price, double sl, double tp)
{
   string filename = "rsibot_trade_log.csv";
   int file = FileOpen(filename, FILE_WRITE | FILE_READ | FILE_CSV | FILE_ANSI | FILE_SHARE_WRITE);
   if (file != INVALID_HANDLE)
   {
      FileSeek(file, 0, SEEK_END);
      string side = (type == ORDER_TYPE_BUY) ? "BUY" : "SELL";
      string log = TimeToString(TimeCurrent(), TIME_DATE | TIME_MINUTES) + "," +
                   _Symbol + "," + side + "," +
                   DoubleToString(price, _Digits) + "," +
                   DoubleToString(sl, _Digits) + "," +
                   DoubleToString(tp, _Digits) + "," +
                   DoubleToString(LotSize, 2) + "," +
                   IntegerToString(ticket);
      FileWrite(file, log);
      FileClose(file);
      Print("Trade logged to file.");
   }
   else
      Print("Failed to log trade.");
}

Bewerbungen

1
Entwickler 1
Bewertung
(254)
Projekte
375
25%
Schlichtung
22
59% / 23%
Frist nicht eingehalten
1
0%
Überlastet
2
Entwickler 2
Bewertung
(368)
Projekte
472
24%
Schlichtung
51
61% / 20%
Frist nicht eingehalten
53
11%
Beschäftigt
3
Entwickler 3
Bewertung
(7)
Projekte
8
25%
Schlichtung
0
Frist nicht eingehalten
0
Beschäftigt
4
Entwickler 4
Bewertung
(424)
Projekte
747
49%
Schlichtung
61
16% / 49%
Frist nicht eingehalten
136
18%
Arbeitet
5
Entwickler 5
Bewertung
(13)
Projekte
15
0%
Schlichtung
1
0% / 0%
Frist nicht eingehalten
0
Arbeitet
6
Entwickler 6
Bewertung
(4)
Projekte
4
25%
Schlichtung
2
0% / 0%
Frist nicht eingehalten
0
Überlastet
7
Entwickler 7
Bewertung
(15)
Projekte
34
24%
Schlichtung
3
0% / 33%
Frist nicht eingehalten
2
6%
Arbeitet
8
Entwickler 8
Bewertung
(284)
Projekte
290
70%
Schlichtung
2
100% / 0%
Frist nicht eingehalten
0
Frei
Veröffentlicht: 1 Beispiel
9
Entwickler 9
Bewertung
(45)
Projekte
58
36%
Schlichtung
1
0% / 0%
Frist nicht eingehalten
1
2%
Arbeitet
10
Entwickler 10
Bewertung
(205)
Projekte
308
34%
Schlichtung
56
38% / 38%
Frist nicht eingehalten
99
32%
Frei
11
Entwickler 11
Bewertung
(435)
Projekte
556
38%
Schlichtung
95
42% / 28%
Frist nicht eingehalten
15
3%
Überlastet
12
Entwickler 12
Bewertung
(277)
Projekte
328
51%
Schlichtung
12
42% / 0%
Frist nicht eingehalten
18
5%
Beschäftigt
13
Entwickler 13
Bewertung
(290)
Projekte
520
36%
Schlichtung
62
34% / 35%
Frist nicht eingehalten
187
36%
Arbeitet
14
Entwickler 14
Bewertung
(8)
Projekte
12
0%
Schlichtung
22
0% / 77%
Frist nicht eingehalten
4
33%
Frei
15
Entwickler 15
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
16
Entwickler 16
Bewertung
Projekte
1
0%
Schlichtung
0
Frist nicht eingehalten
1
100%
Frei
17
Entwickler 17
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
18
Entwickler 18
Bewertung
(7)
Projekte
16
38%
Schlichtung
1
0% / 100%
Frist nicht eingehalten
2
13%
Arbeitet
19
Entwickler 19
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
20
Entwickler 20
Bewertung
Projekte
0
0%
Schlichtung
1
0% / 0%
Frist nicht eingehalten
0
Arbeitet
21
Entwickler 21
Bewertung
(156)
Projekte
280
35%
Schlichtung
14
29% / 50%
Frist nicht eingehalten
42
15%
Frei
22
Entwickler 22
Bewertung
(170)
Projekte
193
42%
Schlichtung
9
11% / 44%
Frist nicht eingehalten
9
5%
Arbeitet
Veröffentlicht: 3 Beispiele
23
Entwickler 23
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
24
Entwickler 24
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
25
Entwickler 25
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
26
Entwickler 26
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
27
Entwickler 27
Bewertung
(4)
Projekte
4
75%
Schlichtung
0
Frist nicht eingehalten
0
Frei
28
Entwickler 28
Bewertung
(11)
Projekte
11
18%
Schlichtung
1
0% / 0%
Frist nicht eingehalten
1
9%
Frei
29
Entwickler 29
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
30
Entwickler 30
Bewertung
(4)
Projekte
2
0%
Schlichtung
1
0% / 0%
Frist nicht eingehalten
1
50%
Arbeitet
31
Entwickler 31
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
32
Entwickler 32
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
33
Entwickler 33
Bewertung
(229)
Projekte
268
77%
Schlichtung
10
80% / 0%
Frist nicht eingehalten
4
1%
Arbeitet
Ähnliche Aufträge
I need an experienced MQL4/MQL5 developer to optimize my existing EA on multiple assets (S&P500, Nasdaq, Tesla, Nvidia, Meta, GBPJPY) using the H4 timeframe. The EA is already built; the task is to optimize key parameters such as: SL, TP, Break-even SL Trailing profit & Partial take profit Number of trades open Market vs Pending orders Deliverables include optimized parameter sets for each asset, with reliable
I need an experienced MQL4/MQL5 developer to optimize my existing EA on multiple assets (S&P500, Nasdaq, Tesla, Nvidia, Meta, GBPJPY) using the H4 timeframe. The EA is already built; the task is to optimize key parameters such as: SL, TP, Break-even SL Trailing profit & Partial take profit Number of trades open Market vs Pending orders Deliverables: optimized parameter sets for each asset, with reliable
MORE WINS GOLD SCALPER 50 - 100 USD
I need someone who can create a scalping trading bot for me. With a 1 - 5 minutes timeframe entry. A good robot that automatically opens a trade and close in profit. BOT should have a 80 percent win rate. Opens only one trade at a time. Closes a trade before opening a new one . Trading strictly GOLD/USD PLEASE TAKE NOTE PROGRAMMER SHOULD BE ABLE TO REMOTELY INSTALL AND SETUP THE BOT AS WELL PROGRAMMER SHOULD ALSO
A few months ago, I started conducting some trading funding tests. I want to develop a management system that allows me to apply it to any account, regardless of the funding company. The idea is that ONLY from 11:00 PM to midnight, Monday through Friday, and on Saturday and Sunday, I can indicate the maximum number of trades allowed per day for each account. This means that if the system detects that I have already
Sharp scalping 30 - 100 USD
I have $1 million account that I need a scalping box for with a 90% win rate I attached a photo of the daily draw down and the max draw down of the account because it is a prop firm challenge. I need it in Pine script for trading view. Thanks
Gold robot 35+ USD
Hello, i need a Gold robot which is safe to be run on a $100 account. This robot should be smart and not include heavy graphics. It should be able to run on its own via VPS without fear. I will need source code. I you have any to show just send me a sample test. NOTE that i will ignore developers who just say hello, simply show up with what you have we talk. The EA must give me descent equity curve. I know nothing is
I need a web-based licensing system for EA/Indicator licensing. I want to sell EAs & Indicators (both MT4 & MT5). I will allow only one account per purchase. I need to be able to add the licensed accounts numbers with reference to a purchase order number. This should work for both MT4/MT5 I should be able to search and find purchase order numbers or account numbers from the database via a web interface. I should be
Project Overview Development of an advanced MetaTrader 5 Expert Advisor (EA) implementing Smart Money Concepts (SMC) trading methodology with comprehensive risk management and an intuitive trading panel interface. The EA will automate the identification and execution of high-probability setups based on institutional trading behavior analysis. Smart Money Concepts Implementation Market Structure Analysis Automated
High Frequency Trading Algorithm Project Project Overview Development of an autonomous high-frequency trading (HFT) system designed to execute algorithmic trading strategies across multiple financial markets with microsecond-level latency optimization. The system will capitalize on short-term market inefficiencies through rapid order execution and sophisticated market microstructure analysis. Technical Architecture
RSI AND MACD EA 150 - 300 USD
I want an MQL5 EA that will trade with macd and RSI. The strategy is simple but I need to add MA news filter, money management and other feature to make it complete. Please bid if you can do the job

Projektdetails

Budget
30 - 50 USD
Ausführungsfristen
von 1 bis 5 Tag(e)

Kunde

Veröffentlichte Aufträge2
Anzahl der Schlichtungen0