Specification
//+------------------------------------------------------------------+
//| Moving Average Crossover EA for MT5 |
//+------------------------------------------------------------------+
#include <Trade\Trade.mqh>
CTrade trade;
input int FastMAPeriod = 50;
input int SlowMAPeriod = 200;
input int StopLossPips = 50;
input int TakeProfitPips = 100;
input double RiskPercent = 2.0;
double lotSize;
//+------------------------------------------------------------------+
//| Calculate lot size based on 2% risk |
//+------------------------------------------------------------------+
double CalculateLotSize(double stopLossPoints)
{
double riskAmount = AccountBalance() * RiskPercent / 100.0;
double tickValue = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE);
double tickSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE);
double point = SymbolInfoDouble(_Symbol, SYMBOL_POINT);
double contractSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_CONTRACT_SIZE);
double lossPerLot = stopLossPoints * point * contractSize / tickSize * tickValue;
return NormalizeDouble(riskAmount / lossPerLot, 2);
}
//+------------------------------------------------------------------+
//| Expert Tick Function |
//+------------------------------------------------------------------+
void OnTick()
{
// Get the current and previous MAs
double maFastCurrent = iMA(_Symbol, _Period, FastMAPeriod, 0, MODE_EMA, PRICE_CLOSE, 0);
double maFastPrevious = iMA(_Symbol, _Period, FastMAPeriod, 0, MODE_EMA, PRICE_CLOSE, 1);
double maSlowCurrent = iMA(_Symbol, _Period, SlowMAPeriod, 0, MODE_EMA, PRICE_CLOSE, 0);
double maSlowPrevious = iMA(_Symbol, _Period, SlowMAPeriod, 0, MODE_EMA, PRICE_CLOSE, 1);
// Check for crossover
if (maFastPrevious < maSlowPrevious && maFastCurrent > maSlowCurrent) // BUY Signal
{
if (PositionSelect(_Symbol) && PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_SELL)
trade.Close(_Symbol); // Close opposite position
if (!PositionSelect(_Symbol)) // Only if no open position
{
double stopLoss = StopLossPips * _Point;
double takeProfit = TakeProfitPips * _Point;
lotSize = CalculateLotSize(StopLossPips * 10); // pip to point conversion
trade.Buy(lotSize, _Symbol, SymbolInfoDouble(_Symbol, SYMBOL_ASK), stopLoss, takeProfit, "Buy on crossover");
}
}
else if (maFastPrevious > maSlowPrevious && maFastCurrent < maSlowCurrent) // SELL Signal
{
if (PositionSelect(_Symbol) && PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY)
trade.Close(_Symbol); // Close opposite position
if (!PositionSelect(_Symbol)) // Only if no open position
{
double stopLoss = StopLossPips * _Point;
double takeProfit = TakeProfitPips * _Point;
lotSize = CalculateLotSize(StopLossPips * 10); // pip to point conversion
trade.Sell(lotSize, _Symbol, SymbolInfoDouble(_Symbol, SYMBOL_BID), stopLoss, takeProfit, "Sell on crossover");
}
}
}
Responded
1
Rating
Projects
186
41%
Arbitration
24
58%
/
21%
Overdue
13
7%
Free
2
Rating
Projects
22
9%
Arbitration
6
33%
/
50%
Overdue
1
5%
Working
3
Rating
Projects
481
23%
Arbitration
58
55%
/
26%
Overdue
55
11%
Loaded
4
Rating
Projects
35
46%
Arbitration
0
Overdue
0
Free
Published: 3 codes
5
Rating
Projects
3
33%
Arbitration
1
0%
/
100%
Overdue
0
Free
6
Rating
Projects
400
27%
Arbitration
39
41%
/
49%
Overdue
1
0%
Free
7
Rating
Projects
472
40%
Arbitration
103
40%
/
23%
Overdue
78
17%
Busy
Published: 2 codes
8
Rating
Projects
333
35%
Arbitration
66
12%
/
58%
Overdue
87
26%
Free
9
Rating
Projects
8
13%
Arbitration
6
33%
/
33%
Overdue
0
Free
10
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
11
Rating
Projects
19
42%
Arbitration
6
0%
/
50%
Overdue
3
16%
Working
12
Rating
Projects
11
0%
Arbitration
4
0%
/
100%
Overdue
2
18%
Working
13
Rating
Projects
0
0%
Arbitration
4
0%
/
75%
Overdue
0
Free
14
Rating
Projects
35
23%
Arbitration
4
0%
/
50%
Overdue
2
6%
Working
15
Rating
Projects
3
0%
Arbitration
3
33%
/
67%
Overdue
1
33%
Free
16
Rating
Projects
67
37%
Arbitration
5
40%
/
40%
Overdue
1
1%
Free
17
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
18
Rating
Projects
5
0%
Arbitration
2
50%
/
50%
Overdue
2
40%
Free
19
Rating
Projects
945
47%
Arbitration
309
58%
/
27%
Overdue
125
13%
Free
Similar orders
I am looking for a professional MQL5 developer to build a structured MT5 Expert Advisor. This is NOT a martingale or high-risk grid bot. Platform: • MT5 only (MQL5 source code required) Symbols: • XAUUSD • GBPUSD • GBPJPY Timeframe: • M5 Risk Management: • Adjustable risk per trade (default 0.5% equity) • Daily drawdown protection (max 3%, auto-lock trading for the day) • Maximum 2 open trades • Minimum 120 seconds
What informtion would you need for Ninjatrader futures automated trading and how long would it take ? if anyone can give me answer i will be happy to discuss more about the project thanks fill free to bid to the project thanks
Custom Indicators MT5
30+ USD
iwant to get indicator for both trades including forex gold algo and other . all FOREX MT 5 TRADING MARKETING must be analyses by and give me indicator or signal on how or where market go next at a specific time
Hello, I need a MetaTrader 5 manual trading assistant panel (NOT an auto trading EA). MAIN IDEA This tool should work like the TradingView long/short position tool inside MT5. Trader workflow: 1) Enter Risk % 2) Enter RR ratio 3) Click SET ENTRY 4) Drag Stop Loss line on chart 5) Lot size and Take Profit calculate automatically 6) Press BUY or SELL to execute trade No trailing stop, no breakeven, no automatic trade
MT5 DEV NEEDED
60+ USD
Hello I'm looking to develop an Expert Advisor (EA) based on my existing indicator EA that uses TrendX600 on the 1-minute timeframe. My objective is to create a scalping bot that can successfully capture one box (60-second candle movement) at a time. If the EA can consistently capture one clean 60-second box without spikes, and repeat this process 4 to 5 times within 24 hours, that would meet my trading goal. To work
Requirements: - Convert my written trading rules into TradingView Pine strategy - Then convert into MT5 EA - Entry must be next candle open after signal candle close - Stop loss on signal candle high/low - Position sizing: fixed % risk per trade - Portfolio risk cap across symbols - One trade per symbol at a time - Must understand backtesting differences (spread, slippage, fill logic) Important: I want to be able to
Hey guys, I’ve been trading for 6 years now and I need to automate a strategy that is really simple and ove developed by myself. Can you help me on that? Here is my e-mail angelocherubini24@gmail.com
SavannaFX Pro
100+ USD
//+------------------------------------------------------------------+ //| SavannaFX Pro | //| Created for Junior | //+------------------------------------------------------------------+ #property strict input int FastMA = 20; input int SlowMA = 50; input int RSIPeriod = 14; input double LotSize = 0.1; input int StopLoss = 300; input int TakeProfit = 600; int
Convert Pinescript indicador to MQL5
100 - 120 USD
Hello, I have a strategy written in Pine Script (TradingView) that used to send signals to MetaTrader 5 via PineConnector. Now I want a native MT5 Expert Advisor (EA) written in MQL5, so I can do full backtesting and trading inside MetaTrader without any external bridge. I will provide: - Full Pine Script code - Entry and exit rules (based on BOS and OB logic) - SL/TP and dynamic risk management (R:R) - Breakeven
EA: lot hedging strategy
30+ USD
Specification Hi Free lancers, I need an EA which relates to Sure Fire Hedging EA base on Below parameters needed. Overview how it works: This EA will be able to open a trade with either Buy or Sell selection (manual- to be manually switch buy or sell selection ), another selection for automatic open trading can choose only buy. Once the EA already open trade (example -buy position) with starting lot size 0.01
Project information
Budget
30+ USD