Specifiche
//+------------------------------------------------------------------+
//| 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
Con risposta
1
Valutazioni
Progetti
34
24%
Arbitraggio
4
0%
/
50%
In ritardo
2
6%
In elaborazione
2
Valutazioni
Progetti
21
10%
Arbitraggio
4
50%
/
50%
In ritardo
1
5%
In elaborazione
3
Valutazioni
Progetti
21
0%
Arbitraggio
3
0%
/
67%
In ritardo
4
19%
Caricato
4
Valutazioni
Progetti
19
74%
Arbitraggio
0
In ritardo
1
5%
In elaborazione
Pubblicati: 2 codici
5
Valutazioni
Progetti
5
20%
Arbitraggio
0
In ritardo
0
Gratuito
6
Valutazioni
Progetti
546
35%
Arbitraggio
79
32%
/
42%
In ritardo
196
36%
In elaborazione
7
Valutazioni
Progetti
6
17%
Arbitraggio
0
In ritardo
3
50%
Gratuito
8
Valutazioni
Progetti
38
24%
Arbitraggio
14
0%
/
93%
In ritardo
4
11%
Gratuito
9
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
10
Valutazioni
Progetti
3
33%
Arbitraggio
2
0%
/
100%
In ritardo
0
Gratuito
11
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
12
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
13
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
14
Valutazioni
Progetti
254
53%
Arbitraggio
16
50%
/
38%
In ritardo
83
33%
Gratuito
15
Valutazioni
Progetti
0
0%
Arbitraggio
5
0%
/
80%
In ritardo
0
Gratuito
16
Valutazioni
Progetti
2
0%
Arbitraggio
1
0%
/
100%
In ritardo
0
In elaborazione
17
Valutazioni
Progetti
9
11%
Arbitraggio
0
In ritardo
2
22%
Gratuito
18
Valutazioni
Progetti
8
0%
Arbitraggio
0
In ritardo
0
Gratuito
19
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
20
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
In elaborazione
Ordini simili
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
VOLUME PROFILE EA
30+ USD
Looking for experience MT5 developer to build a rule-based EA using Volume Profile concept. Only developer with proven past experience working with Volume Profile indicator (ie, VAH, VAL, POC, session profiles or anchored profiles) will be considered. Interested developer must submit a screenshot or video clip of a past project involving Volume Profile, before being shortlisted. Specification will only be shared and
Break The Bands EA v4.0 for MT5 (XAUUSD, 1H)
150 - 200 USD
I need an Expert Advisor (EA) coded for MetaTrader 5 based on the following specifications: Objective: Autonomous trading on Bollinger Band breakouts, robust across trending and consolidating years. Architecture: Max 1 open trade at a time Ignore opposite signals if a trade is open Spread filter: always execute Indicators (Custom): Bollinger Bands (WMA, length 20, deviation 1.5, source: close) ATR (WMA, length 14)
MT5 XAUUSD Scalping EA for REAL Account
50 - 120 USD
I need a professional MQL5 developer to build a REAL-account XAUUSD (Gold) scalping Expert Advisor. Requirements: - MT5 only - Scalping on M1 timeframe - Works on REAL accounts (not demo-only) - Max spread & slippage filter - News filter - Auto lot (risk % adjustable) - One trade at a time Delivery: - Final EX5 file - Testing before full payment Please apply only if you have real experience with XAUUSD scalping
My expert already has the rest of the required features implemented . Bring in your support and resistance expert to save time . My expert already has money management , session filter etc . Trailing is threshold based . Please send a picture as well to show your expert on a live chart . Most specific is the 5m tf , to 1m execution
Informazioni sul progetto
Budget
30+ USD
Scadenze
a 10 giorno(i)
Cliente
Ordini effettuati1
Numero di arbitraggi0