Şartname

//+------------------------------------------------------------------+
//|                                                     MyFirstEA.mq5 |
//+------------------------------------------------------------------+
#property copyright "Me"
#property version   "1.00"
#property strict

#include <Trade\Trade.mqh>

//--- Inputs
input double InpLots        = 0.10;   // Lot size
input int    InpFastMA      = 10;     // Fast MA period
input int    InpSlowMA      = 30;     // Slow MA period
input int    InpStopLoss    = 300;    // Stop loss (points)
input int    InpTakeProfit  = 600;    // Take profit (points)
input int    InpMagic       = 12345;  // Magic number (identifies this EA's trades)

CTrade  trade;
int     hFast, hSlow;
datetime lastBarTime = 0;

//+------------------------------------------------------------------+
int OnInit()
{
   trade.SetExpertMagicNumber(InpMagic);

   hFast = iMA(_Symbol, PERIOD_CURRENT, InpFastMA, 0, MODE_EMA, PRICE_CLOSE);
   hSlow = iMA(_Symbol, PERIOD_CURRENT, InpSlowMA, 0, MODE_EMA, PRICE_CLOSE);

   if(hFast == INVALID_HANDLE || hSlow == INVALID_HANDLE)
   {
      Print("Failed to create MA handles");
      return(INIT_FAILED);
   }
   return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
   if(hFast != INVALID_HANDLE) IndicatorRelease(hFast);
   if(hSlow != INVALID_HANDLE) IndicatorRelease(hSlow);
}

//+------------------------------------------------------------------+
//| Returns true if we already have an open position for this EA     |
//+------------------------------------------------------------------+
bool HasOpenPosition()
{
   for(int i = PositionsTotal() - 1; i >= 0; i--)
   {
      ulong ticket = PositionGetTicket(i);
      if(ticket == 0) continue;
      if(PositionGetString(POSITION_SYMBOL) == _Symbol &&
         PositionGetInteger(POSITION_MAGIC)   == InpMagic)
         return(true);
   }
   return(false);
}

//+------------------------------------------------------------------+
void OnTick()
{
   // Only act once per bar — avoids spamming trades on every tick
   datetime currentBar = iTime(_Symbol, PERIOD_CURRENT, 0);
   if(currentBar == lastBarTime) return;
   lastBarTime = currentBar;

   // Read the two most recent completed values of each MA
   double fast[3], slow[3];
   if(CopyBuffer(hFast, 0, 0, 3, fast) < 3) return;
   if(CopyBuffer(hSlow, 0, 0, 3, slow) < 3) return;

   double point = _Point;
   int    digits = (int)SymbolInfoInteger(_Symbol, SYMBOL_DIGITS);

   // Crossover using bar 1 (last closed) vs bar 2 (the one before)
   bool crossUp   = (fast[2] < slow[2] && fast[1] > slow[1]);
   bool crossDown = (fast[2] > slow[2] && fast[1] < slow[1]);

   if(HasOpenPosition()) return;

   if(crossUp)
   {
      double ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
      double sl  = NormalizeDouble(ask - InpStopLoss   * point, digits);
      double tp  = NormalizeDouble(ask + InpTakeProfit * point, digits);
      trade.Buy(InpLots, _Symbol, ask, sl, tp, "EA long");
   }
   else if(crossDown)
   {
      double bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);
      double sl  = NormalizeDouble(bid + InpStopLoss   * point, digits);
      double tp  = NormalizeDouble(bid - InpTakeProfit * point, digits);
      trade.Sell(InpLots, _Symbol, bid, sl, tp, "EA short");
   }
}

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(22)
Projeler
28
7%
Arabuluculuk
9
33% / 33%
Süresi dolmuş
1
4%
Çalışıyor
2
Geliştirici 2
Derecelendirme
(61)
Projeler
61
51%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
1
2%
Serbest
3
Geliştirici 3
Derecelendirme
(111)
Projeler
184
25%
Arabuluculuk
25
16% / 76%
Süresi dolmuş
16
9%
Serbest
4
Geliştirici 4
Derecelendirme
(408)
Projeler
527
24%
Arabuluculuk
62
58% / 24%
Süresi dolmuş
60
11%
Çalışıyor
5
Geliştirici 5
Derecelendirme
(10)
Projeler
13
77%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Yayınlandı: 1 makale, 2 kod
6
Geliştirici 6
Derecelendirme
(2)
Projeler
2
50%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Yayınlandı: 7 kod
7
Geliştirici 7
Derecelendirme
(30)
Projeler
37
38%
Arabuluculuk
0
Süresi dolmuş
2
5%
Çalışıyor
Yayınlandı: 1 kod
8
Geliştirici 8
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
9
Geliştirici 9
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Yayınlandı: 3 kod
10
Geliştirici 10
Derecelendirme
(9)
Projeler
22
9%
Arabuluculuk
3
0% / 67%
Süresi dolmuş
3
14%
Çalışıyor
11
Geliştirici 11
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Yayınlandı: 2 kod
12
Geliştirici 12
Derecelendirme
(1)
Projeler
1
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Yayınlandı: 5 kod
13
Geliştirici 13
Derecelendirme
(1)
Projeler
1
100%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
14
Geliştirici 14
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
15
Geliştirici 15
Derecelendirme
(1)
Projeler
1
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Yayınlandı: 4 kod
16
Geliştirici 16
Derecelendirme
(60)
Projeler
96
43%
Arabuluculuk
4
0% / 100%
Süresi dolmuş
4
4%
Serbest
17
Geliştirici 17
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
18
Geliştirici 18
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Yayınlandı: 1 kod
19
Geliştirici 19
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
20
Geliştirici 20
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
21
Geliştirici 21
Derecelendirme
(2)
Projeler
2
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Serbest
22
Geliştirici 22
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
23
Geliştirici 23
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Benzer siparişler
Hello, looking for a profitable long term bot to use on real live capital. No martingale allowed. Willing to also give % base ofnprofits for performing fees. Backtest is a must with real ticks
I NEED A PROFITABLE FOREX /FUTURES TRADING ROBOT. A VERY SIMPLE PROFITABLE TRADING ROBOT WITH 3 TECHNICAL CHECKS [AN MQL5 FOREX/FUTURES BOT] . THAT I CAN BOTH USED ON MY PRIVATE LIVE ACCOUNT AND PROP FIRM CHALENGE ACCOUNT. THE STRATEGIES / LOGIC AND THE ARGORITHM CAN BE ANY PRICE ACTION BOT, IT CAN ANY PRICE ACTION COMBINED WITH ANY INDICATOR TO FILTER THE TREND OR TO GIVE ME THE TREND. THESE ARE MUST HALF PARAMETERS
Seeking an Established and Profitable Gold Scalping System – MT5 I am a serious buyer looking to acquire an existing, fully operational Expert Advisor specifically designed for scalping XAUUSD (Gold) on MetaTrader 5. I am particularly interested in experienced developers and quantitative traders who have developed successful proprietary trading systems, including systems that are not publicly available on the MQL5
I am looking for the original developer from Egypt who sent me the MJ v3.01 Gold EA (mj.ex5) on December 2, 2026, with a 10-day demo trial. You were Developer #28 in my previous Freelance job and offered the EA for $200. Unfortunately, I lost access to our previous conversation and would like to reconnect with you. I am still interested in your EA and would like to complete the testing, discuss the settings, and
EA 30+ USD
Build an MT5 Expert Advisor using MQL5. I want an automated trading bot for Exness MT5. Markets: XAUUSD (Gold) BTCUSD (Bitcoin), subject to the broker's actual symbol name. Trading strategy: H1 timeframe for trend direction. M15 timeframe for trade entries. EMA 20 and EMA 50 for trend identification. Only buy when the confirmed trend is bullish. Only sell when the confirmed trend is bearish. Use candle-close
If you already have a working gold order-flow EA that matches the logic described here, I'm open to buying or licensing it instead of a custom build. Please provide: A demo version that I can run in the MT5 Strategy Tester (for example, a time-limited or demo-account-only build) A clear explanation of the trading logic: what triggers an entry, how the stop loss and take profit are set, and which order-flow or
The idea of the trading system is as follows : market entries are performed when MACD's main and signal lines intersect in the current trend direction . 2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is
Looking to Purchase a Proven and Profitable XAUUSD Scalping EA for MT4 I am looking to purchase an existing, fully automated Gold (XAUUSD) scalping EA specifically designed for MetaTrader 4 (MT4) , with proven and verifiable real-money trading performance. Mandatory Requirements: Exclusively designed for XAUUSD (Gold). Fully automated trading on MetaTrader 4. Genuine scalping strategy with relatively short trade
OVERVIEW I have three MT4 custom indicators in .ex4 format only. I do NOT have the .mq4 source files. I need working MT5 versions of all three, with full .mq5 source code. The MT5 versions may be: (a) rebuilt from scratch in MQL5 by analyzing how the EX4 indicators behave, or (b) obtained from the original author's official MT5 version, if one legitimately exists. Decompiling the EX4 files is NOT acceptable. THE
Project Overview I am looking for an experienced MQL5 developer to develop a custom, tick-based Traditional Renko engine for MetaTrader 5. The objective of this initial project is to build a reliable Renko engine that generates confirmed Renko bricks from historical and live market ticks and exposes the complete brick data programmatically for integration with a separately developed Expert Advisor. This is Phase 1 of

Proje bilgisi

Bütçe
30+ USD
Son teslim tarihi
from 1 to 11 gün

Müşteri

Verilmiş siparişler1
Arabuluculuk sayısı0