指定

#define ExtBotName "AK-47 Scalper EA" //Bot Name
#define  Version "1.00"

//--- input parameters
extern string  EASettings        = "---------------------------------------------"; //-------- <EA Settings> --------
input int      InpMagicNumber    = 124656;   //Magic Number

extern string  TradingSettings   = "---------------------------------------------"; //-------- <Trading Settings> --------
input double   Inpuser_lot       = 0.01;     //Lots
input double   InpSL_Pips        = 3.5;      //Stoploss (in Pips)
input double   InpMax_spread     = 0.5;      //Maximum allowed spread (in Pips) (0 = floating)

extern string  MoneySettings     = "---------------------------------------------"; //-------- <Money Settings> --------
input bool     isVolume_Percent  = true;     //Allow Volume Percent
input double   InpRisk           = 3;        //Risk Percentage of Balance (%)

input string   TimeSettings      = "---------------------------------------------"; //-------- <Trading Time Settings> --------
input bool     InpTimeFilter     = true;      //Trading Time Filter
input int      InpStartHour      = 2;         //Start Hour
input int      InpStartMinute    = 30;        //Start Minute
input int      InpEndHour        = 21;        //End Hour
input int      InpEndMinute      = 0;         //End Minute

2. local variables initialization
//--- Variables
int      Pips2Points;               // slippage  3 pips    3=points    30=points
double   Pips2Double;               // Stoploss 15 pips    0.015      0.0150
int      InpMax_slippage   = 3;     // Maximum slippage allow_Pips.
bool     isOrder           = false; // just open 1 order
int      slippage;
string   strComment        = "";

3. Main Code

a/ Expert initialization function

int OnInit()
  {
//---   
   //3 or 5 digits detection
   //Pip and point
   if (Digits % 2 == 1)
   {
      Pips2Double  = _Point*10; 
      Pips2Points  = 10;
      slippage = 10* InpMax_slippage;
   } 
   else
   {    
      Pips2Double  = _Point;
      Pips2Points  =  1;
      slippage = InpMax_slippage;
   }
   
//---
   return(INIT_SUCCEEDED);
  }

b/ Expert tick function

void OnTick()
  {
//---
     if(IsTradeAllowed() == false)
     {
      Comment("AK-47 EA\nTrade not allowed.");
      return;
     }
     
       MqlDateTime structTime;
       TimeCurrent(structTime);
       structTime.sec = 0;
       
       //Set starting time
       structTime.hour = InpStartHour;
       structTime.min = InpStartMinute;       
       datetime timeStart = StructToTime(structTime);
       
       //Set Ending time
       structTime.hour = InpEndHour;
       structTime.min = InpEndMinute;
       datetime timeEnd = StructToTime(structTime);
       
       double acSpread = MarketInfo(Symbol(), MODE_SPREAD);
       StopLevel = MarketInfo(Symbol(), MODE_STOPLEVEL);
      
      strComment = "\n" + ExtBotName + " - v." + (string)Version;
      strComment += "\nGMT time = " + TimeToString(TimeGMT(),TIME_DATE|TIME_SECONDS);
      strComment += "\nTrading time = [" + (string)InpStartHour + "h" + (string)InpStartMinute + " --> " +  (string)InpEndHour + "h" + (string)InpEndMinute + "]";
      
      strComment += "\nCurrent Spread = " + (string)acSpread + " Points";
      strComment += "\nCurrent stoplevel = " + (string)StopLevel + " Points";
      
      Comment(strComment);
   
      //Update Values
      UpdateOrders();
      
      TrailingStop();
      
      //Check Trading time
      if(InpTimeFilter)
      {
         if(TimeCurrent() >= timeStart && TimeCurrent() < timeEnd)
         {
            if(!isOrder) OpenOrder();
         }
      }
      else
      {
         if(!isOrder) OpenOrder();
      }
  }

3.1 Calculate signal in order to send orders

void OpenOrder(){
   
   //int OrdType = OP_SELL;//-1;

   double TP = 0;
   double SL = 0;
   string comment = ExtBotName;

   //Calculate Lots
   double lot1 = CalculateVolume();
   
   //if(OrdType == OP_SELL){
      double OpenPrice = NormalizeDouble(Bid - (StopLevel * _Point) - (InpSL_Pips/2) * Pips2Double, Digits);
      SL = NormalizeDouble(Ask + StopLevel * _Point + InpSL_Pips/2 * Pips2Double, Digits);
         
      if(CheckSpreadAllow())                                    //Check Spread
      {
         if(!OrderSend(_Symbol, OP_SELLSTOP, lot1, OpenPrice, slippage, SL, TP, comment, InpMagicNumber, 0, clrRed))
         Print(__FUNCTION__,"--> OrderSend error ",GetLastError());
      }
   //}
}

3.2 Calculate Volume

double CalculateVolume()
  {
   double LotSize = 0;

   if(isVolume_Percent == false)
     {
      LotSize = Inpuser_lot;
     }
   else
     {

      LotSize = (InpRisk) * AccountFreeMargin();
      LotSize = LotSize /100000;
      double n = MathFloor(LotSize/Inpuser_lot);
      //Comment((string)n);
      LotSize = n * Inpuser_lot;

      if(LotSize < Inpuser_lot)
         LotSize = Inpuser_lot;

      if(LotSize > MarketInfo(Symbol(),MODE_MAXLOT))
         LotSize = MarketInfo(Symbol(),MODE_MAXLOT);

      if(LotSize < MarketInfo(Symbol(),MODE_MINLOT))
         LotSize = MarketInfo(Symbol(),MODE_MINLOT);
     }

   return(LotSize);
  }

3.3 EA has function "trailing Stop", SL will change every time price change (down)

void TrailingStop()
  {
   for(int i = OrdersTotal() - 1; i >= 0; i--)
     {
      if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
        {
         if((OrderMagicNumber() == InpMagicNumber) && (OrderSymbol() == Symbol()))   //_Symbol))
           {

            //For Sell Order
            if(OrderType() == OP_SELL)
              {
                  //--Calculate SL when price changed
                  double SL_in_Pip = NormalizeDouble(OrderStopLoss() - (StopLevel * _Point) - Ask, Digits) / Pips2Double;
                  if(SL_in_Pip > InpSL_Pips){
                        double newSL = NormalizeDouble(Ask + (StopLevel * _Point) + InpSL_Pips * Pips2Double, Digits);
                        if(!OrderModify(OrderTicket(), OrderOpenPrice(), newSL, OrderTakeProfit(), 0, clrRed))
                        {
                           Print(__FUNCTION__,"--> OrderModify error ",GetLastError());
                           continue;  
                        }
                    }
              }
             
            //For SellStop Order
            else if(OrderType() == OP_SELLSTOP)
              {
                  double SL_in_Pip = NormalizeDouble(OrderStopLoss() - (StopLevel * _Point) - Ask, Digits) / Pips2Double;
                  
                  if(SL_in_Pip < InpSL_Pips/2){
                     double newOP = NormalizeDouble(Bid - (StopLevel * _Point) - (InpSL_Pips/2) * Pips2Double, Digits);
                     double newSL = NormalizeDouble(Ask + (StopLevel * _Point) + (InpSL_Pips/2) * Pips2Double, Digits);
                     
                     if(!OrderModify(OrderTicket(), newOP, newSL, OrderTakeProfit(), 0, clrRed))
                     {
                        Print(__FUNCTION__,"--> Modify PendingOrder error!", GetLastError());
                        continue;  
                     }
                  
                  }
              }
              
           }
        }
     }
  }

反馈

1
开发者 1
等级
(21)
项目
30
57%
仲裁
0
逾期
1
3%
空闲
2
开发者 2
等级
(102)
项目
105
60%
仲裁
0
逾期
0
空闲
3
开发者 3
等级
(27)
项目
37
24%
仲裁
14
0% / 93%
逾期
4
11%
空闲
4
开发者 4
等级
(553)
项目
627
40%
仲裁
2
100% / 0%
逾期
1
0%
空闲
发布者: 9 代码
5
开发者 5
等级
(7)
项目
11
0%
仲裁
4
0% / 100%
逾期
2
18%
工作中
6
开发者 6
等级
(163)
项目
258
61%
仲裁
4
50% / 25%
逾期
10
4%
空闲
7
开发者 7
等级
(175)
项目
225
20%
仲裁
19
42% / 16%
逾期
0
已载入
8
开发者 8
等级
(33)
项目
35
20%
仲裁
5
40% / 40%
逾期
0
空闲
发布者: 1 代码
9
开发者 9
等级
项目
0
0%
仲裁
0
逾期
0
空闲
发布者: 1 代码
10
开发者 10
等级
(246)
项目
253
30%
仲裁
0
逾期
3
1%
空闲
发布者: 2 代码
11
开发者 11
等级
(539)
项目
618
33%
仲裁
35
37% / 49%
逾期
10
2%
繁忙
12
开发者 12
等级
(77)
项目
240
73%
仲裁
7
100% / 0%
逾期
1
0%
空闲
相似订单
Hello Developers, I need a utility that allows to me open multiple positions. First the utility will show me all currency pairs on the watch list, and it will give me the option to either buy, sell, or neutral for each currency pair. Secondly, lot sizes for all currency pairs (that are not neutral) are determined through an input of cost per pip (USD). Lastly, then the execute button, which opens positions according
Mt5 Scalper Ea 100+ USD
Hi i want to make Mt5 scalping ea which works on xauusd and highly profitable who have strategy please dm me and with demo version of ea so i can test and see how it works before buying it
1. Background & MQL5 Journey: ¿Cuéntame un poco sobre tu background en trading algorítmico y qué te emociona de crear EAs de alto rendimiento? 2. Experience: ¿Cuáles son 2-3 EAs destacados que has creado (mercados, Sharpe, PF, señales/backtests)? 3. Institutional Results: ¿Puedes lograr Sharpe ≥3.0, PF >2.5, <10% DD en XAUUSD? ¿Qué te da confianza? 4. Demo EA: ¿Tienes una señal de EA top (MQL5/Myfxbook) con 100+
Here's the TradeStation ELD files that i want to convert to tradingview pine script (unprotected so you can see codes for indicators and systems/strategies) - let me know what you think it would cost? thanks i will be looking for great developer that will bid it for it and get started
Project Overview I am looking for an experienced MT5 (MQL5) developer to modify an existing Account Protection EA and, if required, extend it with custom logic. This is NOT a strategy or trading EA . The EA is purely for risk management, drawdown protection, alerts, and trading lock , suitable for prop-firm and managed accounts . Core Requirements 1. Alerts & Monitoring Alert on trade entry and trade exit Alert when
Aš ieškau patyrusio Pine Script v5 kūrėjas, kuris gali projektuoti (pirmiausia architektūra) švarią, modulinę sistemą, skirtą tendencijų tęsimo sistema "TradingView". Tai NE: - MetaTrader (MT4 / MT5) projektas - Ekspertų patarėjas (EA) - baigta prekybos strategija - indikatorius su SL / TP - optimizavimo arba atgalinio testavimo darbai Tai yra: - Pine Script v5 sistema (tik signalai) - EMA pagrįstas tendencijų
Need a pro dev to create an MT4 Expert Advisor ("Monitor EA") acting as execution firewall & auto-recovery controller for multiple EAs on XAUUSD (M1). How it works: Runs on blank chart; controls EAs via chart/template actions Closes/reopens charts to manage trades (EAs aren't editable) Targets IC Markets/VT Markets ECN Raw Source code handed over on completion Key Features:* XAUUSD (Gold) focus M1 timeframe
We're looking for a highly professional MQL5 developer to create FX Apex, an advanced scalping EA optimized for small accounts ($50+), 1:30 leverage, IC Markets broker, and ready for demo/live trading. Key Features:_ Scalps XAU/USD & major pairs (M1-M15), option to add more Adaptive TP/SL based on volatility, trend, ATR, momentum Dynamic trailing, breakeven, partial close functionality Configurable risk per trade
I have an existing MetaTrader 5 EA that requires significant improvements to its **risk management logic and trade execution** behavior. Currently, the EA executes trades without applying proper stop loss, take profit, or trailing mechanisms, which results in high drawdown and potential loss of capital. The goal is to **optimize the EA for low risk and high return**, starting with small capital (e.g., \$10, \$50
I need a MetaTrader 5 Expert Advisor based on SMA 5/9 crossover: - Only one position at a time. - Close & reverse on opposite SMA cross. - No trading on very large breakout candles. - Stop Loss mandatory, 20-50 pips. - Manual lot size and manual timeframe. - EA must be clean, optimized, stable for Gold and Forex. Attached file contains full EA specification for development

项目信息

预算
30 - 200 USD
截止日期
 1  100 天