Техническое задание
//+------------------------------------------------------------------+
//| EMA + Resistance Break & First Retest EA - ATR SL/TP - Risk 3% |
//| Fully working MT4 EA |
//+------------------------------------------------------------------+
#property strict
//---- Inputs
input double RiskPercent = 3.0;
input int ATR_Period = 14;
input double SL_ATR_Multiplier = 1.5;
input double TP_ATR_Multiplier = 2.0;
input int StopLossPipsFallback = 50; // Fallback if ATR fails
input int TakeProfitPipsFallback = 100;
input int H4_MA_Period = 9;
input int FastEMA = 5;
input int SlowEMA = 13;
input int ResistanceLookback = 50; // H4 candles to scan for resistance
input int ResistanceBufferPips = 10; // Entry buffer around resistance
input string ResistanceLineName = "H4_Resistance";
input bool DrawSLTP = true;
//---- Session Settings (Broker Time)
input int LondonStartHour = 8;
input int LondonEndHour = 17;
input int NYStartHour = 13;
input int NYEndHour = 22;
//---- Other Settings
input int MagicNumber = 12345;
input bool EnableSell = true;
//---- Globals
datetime lastCandleTime = 0;
int lastTradeSession = -1; // 0=London, 1=NY
int lastTradeDay = -1;
bool firstRetestDone = false;
//+------------------------------------------------------------------+
//| Get current session |
//+------------------------------------------------------------------+
int GetCurrentSession()
{
int hour = TimeHour(TimeCurrent());
if(hour >= LondonStartHour && hour < LondonEndHour) return 0; // London
if(hour >= NYStartHour && hour < NYEndHour) return 1; // NY
return -1; // No session
}
//+------------------------------------------------------------------+
//| Check if trading allowed in this session |
//+------------------------------------------------------------------+
bool CanTradeSession()
{
int session = GetCurrentSession();
if(session == -1) return false;
int day = TimeDay(TimeCurrent());
// Reset first retest on new session
if(session != lastTradeSession || day != lastTradeDay)
{
firstRetestDone = false;
}
// Allow trade if first retest not done yet
if(firstRetestDone) return false;
return true;
}
//+------------------------------------------------------------------+
//| Get lot size based on risk |
//+------------------------------------------------------------------+
double GetLotSize(double stopLossPips)
{
double riskAmount = AccountBalance() * RiskPercent / 100.0;
double pipValue = MarketInfo(Symbol(), MODE_TICKVALUE);
double lot = riskAmount / (stopLossPips * pipValue);
double minLot = MarketInfo(Symbol(), MODE_MINLOT);
double maxLot = MarketInfo(Symbol(), MODE_MAXLOT);
double lotStep = MarketInfo(Symbol(), MODE_LOTSTEP);
lot = MathFloor(lot / lotStep) * lotStep;
lot = MathMax(minLot, MathMin(lot, maxLot));
return NormalizeDouble(lot, 2);
}
//+------------------------------------------------------------------+
//| Check if trade is open |
//+------------------------------------------------------------------+
bool IsTradeOpen()
{
for(int i=0; i<OrdersTotal(); i++)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
if(OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber)
return true;
}
return false;
}
//+------------------------------------------------------------------+
//| Register trade session |
//+------------------------------------------------------------------+
void RegisterTrade()
{
lastTradeSession = GetCurrentSession();
lastTradeDay = TimeDay(TimeCurrent());
firstRetestDone = true;
}
//+------------------------------------------------------------------+
//| Get last H4 resistance |
//+------------------------------------------------------------------+
double GetLastH4Resistance()
{
double resistance = 0;
for(int i=2; i<=ResistanceLookback; i++)
{
double high = iHigh(Symbol(), PERIOD_H4, i);
if(high > resistance) resistance = high;
}
return resistance;
}
//+------------------------------------------------------------------+
//| Draw resistance line |
//+------------------------------------------------------------------+
void DrawResistanceLine(double price)
{
if(ObjectFind(ResistanceLineName) == -1)
{
ObjectCreate(ResistanceLineName, OBJ_HLINE, 0, 0, price);
ObjectSet(ResistanceLineName, OBJPROP_COLOR, clrRed);
ObjectSet(ResistanceLineName, OBJPROP_WIDTH, 2);
ObjectSet(ResistanceLineName, OBJPROP_STYLE, STYLE_DASH);
}
else ObjectSet(ResistanceLineName, OBJPROP_PRICE1, price);
}
//+------------------------------------------------------------------+
//| Draw SL/TP lines on chart |
//+------------------------------------------------------------------+
void DrawSLTPLines(double slPrice, double tpPrice)
{
if(!DrawSLTP) return;
string slName = "ATR_SL";
string tpName = "ATR_TP";
// SL
if(ObjectFind(slName) == -1)
ObjectCreate(slName, OBJ_HLINE, 0, 0, slPrice);
ObjectSet(slName, OBJPROP_COLOR, clrRed);
ObjectSet(slName, OBJPROP_WIDTH, 2);
ObjectSet(slName, OBJPROP_STYLE, STYLE_DASH);
ObjectSet(slName, OBJPROP_PRICE1, slPrice);
// TP
if(ObjectFind(tpName) == -1)
ObjectCreate(tpName, OBJ_HLINE, 0, 0, tpPrice);
ObjectSet(tpName, OBJPROP_COLOR, clrLime);
ObjectSet(tpName, OBJPROP_WIDTH, 2);
ObjectSet(tpName, OBJPROP_STYLE, STYLE_DASH);
ObjectSet(tpName, OBJPROP_PRICE1, tpPrice);
}
//+------------------------------------------------------------------+
//| Get ATR distance |
//+------------------------------------------------------------------+
double GetATRDistance(int atrPeriod, double multiplier)
{
double atr = iATR(Symbol(), PERIOD_H4, atrPeriod, 1);
return atr * multiplier;
}
//+------------------------------------------------------------------+
//| OnTick |
//+------------------------------------------------------------------+
void OnTick()
{
int session = GetCurrentSession();
if(session == -1 || !CanTradeSession()) return;
datetime currentCandle = iTime(Symbol(), PERIOD_M30, 0);
if(currentCandle == lastCandleTime) return;
lastCandleTime = currentCandle;
if(IsTradeOpen()) return;
double pip = (Digits==3||Digits==5)?Point*10:Point;
//--- H4 trend
double h4_ma = iMA(Symbol(), PERIOD_H4, H4_MA_Period, 0, MODE_EMA, PRICE_CLOSE, 1);
double h4_price = iClose(Symbol(), PERIOD_H4, 1);
//--- EMA crossover M30
double emaFast_1 = iMA(Symbol(), PERIOD_M30, FastEMA, 0, MODE_EMA, PRICE_CLOSE, 1);
double emaFast_2 = iMA(Symbol(), PERIOD_M30, FastEMA, 0, MODE_EMA, PRICE_CLOSE, 2);
double emaSlow_1 = iMA(Symbol(), PERIOD_M30, SlowEMA, 0, MODE_EMA, PRICE_CLOSE, 1);
double emaSlow_2 = iMA(Symbol(), PERIOD_M30, SlowEMA, 0, MODE_EMA, PRICE_CLOSE, 2);
//--- Resistance
double resistance = GetLastH4Resistance();
DrawResistanceLine(resistance);
double h4_close = iClose(Symbol(), PERIOD_H4, 1);
double buffer = ResistanceBufferPips * pip;
bool h4BreakConfirmed = h4_close > resistance;
bool priceRetest = MathAbs(Bid - resistance) <= buffer;
//--- ATR SL/TP
double atrSL = GetATRDistance(ATR_Period, SL_ATR_Multiplier);
double atrTP = GetATRDistance(ATR_Period, TP_ATR_Multiplier);
//--- BUY
bool buyCondition =
h4BreakConfirmed &&
h4_price > h4_ma &&
emaFast_2 < emaSlow_2 &&
emaFast_1 > emaSlow_1 &&
priceRetest;
if(buyCondition)
{
double lot = GetLotSize(atrSL/pip);
double sl = Bid - atrSL;
double tp = Bid + atrTP;
DrawSLTPLines(sl,tp);
if(OrderSend(Symbol(), OP_BUY, lot, Ask, 3, sl, tp,
"EMA Buy ATR SL/TP", MagicNumber, 0, clrBlue) > 0)
{
RegisterTrade();
}
}
//--- SELL
if(EnableSell)
{
bool sellCondition =
h4_close < resistance &&
h4_price < h4_ma &&
emaFast_2 > emaSlow_2 &&
emaFast_1 < emaSlow_1 &&
priceRetest;
if(sellCondition)
{
double lot = GetLotSize(atrSL/pip);
double sl = Ask + atrSL;
double tp = Ask - atrTP;
DrawSLTPLines(sl,tp);
if(OrderSend(Symbol(), OP_SELL, lot, Bid, 3, sl, tp,
"EMA Sell ATR SL/TP", MagicNumber, 0, clrRed) > 0)
{
RegisterTrade();
}
}
}
}
//+------------------------------------------------------------------+
Please can you correct this EA to make it work
Откликнулись
1
Оценка
Проекты
34
24%
Арбитраж
4
0%
/
50%
Просрочено
2
6%
Работает
2
Оценка
Проекты
21
10%
Арбитраж
4
50%
/
50%
Просрочено
1
5%
Работает
3
Оценка
Проекты
21
0%
Арбитраж
3
0%
/
67%
Просрочено
4
19%
Загружен
4
Оценка
Проекты
19
74%
Арбитраж
0
Просрочено
1
5%
Работает
Опубликовал: 2 примера
5
Оценка
Проекты
5
20%
Арбитраж
0
Просрочено
0
Работает
6
Оценка
Проекты
546
35%
Арбитраж
79
32%
/
42%
Просрочено
196
36%
Работает
7
Оценка
Проекты
6
17%
Арбитраж
0
Просрочено
3
50%
Свободен
8
Оценка
Проекты
38
24%
Арбитраж
14
0%
/
93%
Просрочено
4
11%
Свободен
9
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
10
Оценка
Проекты
3
33%
Арбитраж
2
0%
/
100%
Просрочено
0
Свободен
11
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
12
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
13
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
14
Оценка
Проекты
254
53%
Арбитраж
16
50%
/
38%
Просрочено
83
33%
Свободен
15
Оценка
Проекты
0
0%
Арбитраж
5
0%
/
80%
Просрочено
0
Свободен
16
Оценка
Проекты
2
0%
Арбитраж
1
0%
/
100%
Просрочено
0
Работает
17
Оценка
Проекты
9
11%
Арбитраж
0
Просрочено
2
22%
Свободен
18
Оценка
Проекты
8
0%
Арбитраж
0
Просрочено
0
Свободен
19
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
20
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Работает
21
Оценка
Проекты
1
0%
Арбитраж
0
Просрочено
1
100%
Свободен
22
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
23
Оценка
Проекты
228
80%
Арбитраж
22
27%
/
50%
Просрочено
11
5%
Свободен
Опубликовал: 24 статьи, 1882 примера
24
Оценка
Проекты
4
0%
Арбитраж
2
50%
/
50%
Просрочено
2
50%
Свободен
25
Оценка
Проекты
1
100%
Арбитраж
3
0%
/
100%
Просрочено
0
Свободен
26
Оценка
Проекты
56
4%
Арбитраж
7
0%
/
57%
Просрочено
4
7%
Работает
27
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
28
Оценка
Проекты
469
39%
Арбитраж
102
40%
/
24%
Просрочено
77
16%
Загружен
Опубликовал: 2 примера
Похожие заказы
PrimeFlowEA — v1 Specification Objective: PrimeFlowEA v1 is designed to enforce disciplined, rule-based execution within a single daily trading session. The goal of v1 is correct behavior and execution discipline , not optimization or performance tuning. 1. Market & Time Platform: MetaTrader 5 (MQL5) Symbol(s): User-selectable (single symbol per chart) Execution timeframe: Configurable (default: M5 / M15)
Top manager
70 - 120 USD
A multi-symbol, rule-based trade management Expert Advisor designed to recover, neutralize, and scale out of DCA baskets using intelligent closing logic and full manual control through an on-chart dashboard. The EA continuously scans multiple symbols and monitors all open trades with a specific magic number. Based on trader-enabled rules (R1–R4) and Break-Even modes (BE1–BE3), it selectively closes trades when
Development of an MQL5 Expert Advisor (Reverse Engineering)
1000 - 2000 USD
Specifications – Development of an MQL5 Expert Advisor (Reverse Engineering) Project context: I have access to a real trading history consisting of more than 500 trades executed over a period of approximately 3 years. These trades have been exported into a CSV file containing all available information, including date, time, symbol, order type, entry price, and exit price. Important: I do not have access to the
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
Trading Bot Executes Trades on Specific Days via TradingView Alerts **As a** trader, **I want** to develop a trading bot that integrates with TradeLocker and MTS, **So that** when a TradingView alert (based on a 2,4,5,10,15,30 minute break and retest strategy whichever one) is triggered first. the bot will execute trades on both platforms, but only on specific days of the week. --- ## Acceptance Criteria 1
Project Description I am looking to collaborate with an experienced MQL5 / algorithmic trading developer who also has hands-on experience with Large Language Models (LLMs) and AI-driven systems. This is a long-term partnership opportunity , not a one-off paid freelance job. I bring 9 years of practical Elliott Wave trading experience , applied in live market conditions. The objective is to translate Elliott Wave
Hello, I’m looking for an experienced MT4 (MQL4) developer to convert the Lucky Reversal indicator from indicatorspot.com into a fully functional Expert Advisor (EA). Project Scope Code an MT4 EA that replicates the exact logic and signals of the Lucky Reversal indicator Trades should open and close automatically based on the indicator’s rules Must match indicator behavior 1:1 (no approximations) EA Requirements MT4
Need profitable XAUUSD EA for Mt5.
30 - 1000 USD
Looking for a developer to develop or provide past expert advisor that can cope with high impact news and high trends. needs to be mt5. Any strategy necessary. need to be able to backtest myself or see past results. Minimum profit per month 30% but needs to be very low drawdown. Can be one shot trade a day or a 1 min scalper ea. I will not be going to telegram to discuss further
🔹 COMPLETE DEVELOPMENT ASSIGNMENT Institutional Volume & Structure Indicator Platform: MT5 (preferred) OR TradingView (Pine Script v5) Type: Indicator only (NO EA, NO auto trading) Purpose: Institutional analysis for manual trading & manual backtesting 1. GENERAL REQUIREMENTS Indicator only (no orders, no strategy execution) No repainting Auto update + auto remove logic Clean, modular, performance-safe code User
Trading bot fully automated
30 - 299 USD
specification High-Frequency Candle Momentum Scalper 1. Strategy Overview Core Logic: The EA identifies the current color of the active candle (Bullish or Bearish). Entry Trigger: It opens positions only after a specific duration of the candle has passed (e.g., after 30 seconds on a 1-minute candle) to confirm the direction. 2. Entry Logic (The "Half-Candle" Rule) Timeframe: M1 (Default, but adjustable). Time Filter
Информация о проекте
Бюджет
30+ USD
Сроки выполнения
до 10 дн.
Заказчик
Размещено заказов1
Количество арбитражей0