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
Évaluation
Projets
998
47%
Arbitrage
33
36%
/
36%
En retard
98
10%
Travail
Publié : 6 codes
2
Évaluation
Projets
173
25%
Arbitrage
23
9%
/
78%
En retard
16
9%
Travail
3
Évaluation
Projets
0
0%
Arbitrage
2
0%
/
100%
En retard
0
Gratuit
4
Évaluation
Projets
402
27%
Arbitrage
40
40%
/
50%
En retard
1
0%
Travail
5
Évaluation
Projets
1
0%
Arbitrage
1
0%
/
100%
En retard
0
Gratuit
6
Évaluation
Projets
11
0%
Arbitrage
2
0%
/
50%
En retard
2
18%
Travail
7
Évaluation
Projets
2
0%
Arbitrage
4
25%
/
50%
En retard
1
50%
Gratuit
8
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
9
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
10
Évaluation
Projets
35
34%
Arbitrage
5
0%
/
80%
En retard
0
Travail
Publié : 2 codes
11
Évaluation
Projets
264
30%
Arbitrage
0
En retard
3
1%
Gratuit
Publié : 2 codes
12
Évaluation
Projets
0
0%
Arbitrage
1
0%
/
100%
En retard
0
Gratuit
13
Évaluation
Projets
3
33%
Arbitrage
2
0%
/
100%
En retard
0
Gratuit
14
Évaluation
Projets
22
18%
Arbitrage
4
50%
/
25%
En retard
4
18%
Travail
15
Évaluation
Projets
0
0%
Arbitrage
5
0%
/
80%
En retard
0
Gratuit
16
Évaluation
Projets
170
39%
Arbitrage
10
40%
/
0%
En retard
30
18%
Travail
17
Évaluation
Projets
8
13%
Arbitrage
3
0%
/
33%
En retard
2
25%
Gratuit
Publié : 1 code
18
Évaluation
Projets
8
0%
Arbitrage
3
33%
/
67%
En retard
4
50%
Gratuit
19
Évaluation
Projets
1
100%
Arbitrage
3
0%
/
100%
En retard
0
Gratuit
20
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
21
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
22
Évaluation
Projets
43
58%
Arbitrage
1
100%
/
0%
En retard
1
2%
Gratuit
Publié : 5 codes
Commandes similaires
I have a 90% completed project with the execution part left to complete, I have been struggling to complete this section and I need help from someone expert in MQL5 with knowledge on forex trading and ICT Concepts coding. Contact me for further details
Patricia Ukawilu 6:43 PM I need help creating an EA to optimize my trade. I already have a preliminary pine script which I will want optimized and create an EA from it to optimize my trade on MT4. I also subscribed to a signal app. I’m looking to automate the execution of the signal from the app so as not to miss out on good trades
I am looking for an experienced MQL5 developer with Python/data analysis skills. I have my own MT5 Strategy Tester reports, exported trade history, and market CSV data. I need help analyzing these files and developing a new independent Expert Advisor based on clearly defined, statistically tested, and validated trading rules. Tasks: Analyze my MT5 Strategy Tester reports and exported trade history. Compare historical
We are looking for a developer to finish and stabilize an existing Kalshi trading bot (~60% complete) built in TypeScript. This is not a MetaTrader EA. The system interacts with the Kalshi API and requires strong understanding of execution logic, order handling, and state management. Scope of Work: Review and understand existing TypeScript codebase Complete missing functionality Fix execution issues (order placement
I need a professional MT5 Expert Advisor (EA) built with clean, modular code. This is an advanced strategy combining liquidity concepts, controlled DCA, hedge protection, and strict risk management. Core Requirements: Entry Logic (ALL must align): Liquidity sweep (Previous Day High/Low breakout and return) EMA50 and EMA200 trend alignment Higher timeframe bias (H1 or H4) RSI confirmation Bollinger Band entry Filters
Greetings I need MT5 developer that has expertise in developing a custom indicator for mt5 boom and crash based on my exact details and requirements which would be discuss later. Kindly bid for this project if it is something you can handle for me
MT5 prop firm EA
30+ USD
I need a MT5 Prop firm challenge passing EA with strict prop firm rules compliance. Any strategy can be used but win rate should be above 70%. It should have high impact news filter and a dashboard panel to monitor daily drawdown, target profit, current balance, etc. It should not have martingale, grid, hedging, etc
Hello Developers I have a Project to get done! i have a simple strategy can you please create the automated forex ea to execute my trading strategy? i need custom ea for tradingview and mt4/mt5 correction: i need a tradingview indicator created that tells me when to buy or sell. and ea in mt4/mt5
EA for prop firms
30 - 500 USD
Hi, I am looking to purchase a MT5 EA that can show consistent profitability 5% each month with drawdown less than 9%. I am not ready to build a new one from scratch as i do not have the strategy in mind yet so i do not want to take the risk of building one but not sure if it works. Only apply if you have an existing proven and tested EA that can sell to me together with the source code. The Ea is for prop firm even
Early Killer EA
30+ USD
It must have automated stop loss. Something that can end poverty and kill the market early.It must take the trades for me whenever I start it it must work on tradeport ea
Informations sur le projet
Budget
30 - 500 USD