Termos de Referência

#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;  
                     }
                  
                  }
              }
              
           }
        }
     }
  }

Respondido

1
Desenvolvedor 1
Classificação
(21)
Projetos
30
57%
Arbitragem
0
Expirado
1
3%
Livre
2
Desenvolvedor 2
Classificação
(102)
Projetos
105
60%
Arbitragem
0
Expirado
0
Livre
3
Desenvolvedor 3
Classificação
(27)
Projetos
36
25%
Arbitragem
1
0% / 0%
Expirado
4
11%
Trabalhando
4
Desenvolvedor 4
Classificação
(511)
Projetos
585
38%
Arbitragem
2
100% / 0%
Expirado
1
0%
Livre
Publicou: 9 códigos
5
Desenvolvedor 5
Classificação
(7)
Projetos
11
0%
Arbitragem
4
0% / 100%
Expirado
2
18%
Trabalhando
6
Desenvolvedor 6
Classificação
(163)
Projetos
258
61%
Arbitragem
4
50% / 25%
Expirado
10
4%
Livre
7
Desenvolvedor 7
Classificação
(164)
Projetos
211
19%
Arbitragem
19
42% / 16%
Expirado
0
Trabalhando
8
Desenvolvedor 8
Classificação
(33)
Projetos
35
20%
Arbitragem
4
50% / 25%
Expirado
0
Livre
Publicou: 1 código
9
Desenvolvedor 9
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
10
Desenvolvedor 10
Classificação
(236)
Projetos
242
31%
Arbitragem
0
Expirado
3
1%
Livre
Publicou: 2 códigos
11
Desenvolvedor 11
Classificação
(535)
Projetos
613
34%
Arbitragem
34
38% / 47%
Expirado
9
1%
Ocupado
12
Desenvolvedor 12
Classificação
(77)
Projetos
232
73%
Arbitragem
6
100% / 0%
Expirado
1
0%
Livre
Pedidos semelhantes
Shybossforex robot 30 - 50 USD
Shybossforex strategy full data continuation and reversal.The strategy of continuation and reversal is trading technique 5hat involves two different approach to trade execution.The continuation and reversal is based on assumption that current market trend will continuation in future and therefore inloves taking position in same direction as prevailing trending,I will wait for the pullback and continuation trade with
Customizable Forex Trading Bot for MetaTrader 4 & 5 Project Overview I am a professional zone‑to‑zone trader seeking an experienced developer to build a fully customizable forex trading bot (Expert Advisor) that operates on both MetaTrader 4 and MetaTrader 5. The bot must execute trades according to detailed instructions that I will provide once an ambitious and suitable applicant is selected. It should allow easy
I am looking for an experienced MQL5 developer to build a trading robot based on my personal strategy. The EA should be coded professionally, with efficiency, accuracy, and risk management in mind. Strategy Overview: The strategy is structure-based with Fibonacci retracement (0.618–0.79) as the primary Point of Interest (POI). Secondary confluences include order blocks, support/resistance, psychological levels, and
I need a custom options scanner built with the following features: Scan ATM call or put options with the same expiry . Filter for open interest ≥ 175 . Expiration between 1 to 60 days . Underlying stock price between $5 and $175 . Use mark price for calculations. Results should be sortable by debit or credit . Scanner should include ETFs as well as stocks . Goal: A simple and efficient scanner that quickly identifies
Starting from any swing point I choose, the indicator should be able to calculate how many pips u or down that I specify up to ten levels. If I drop it on a swing point at 1.300 for example, and I choose an interval of 40 pips for example, it should draw a horizontal line at 1.3040, 1.3080 and so on up to ten levels. If I drop it on a swing high, it should calulate in reverse at 1.300, 1.2960, 1.2920 and so on
Ai spike Indicator 30 - 35 USD
Create an Ai based indicator that is able to identify sudden market movements known as spikes on boom and crash indices on the deriv market. The Ai should incorporate these strategies for better precision on getting signals, these strategies include support and resistance on 4 hour time frame SMC, CRT, ICT, Strategies volume trend, volatility pure price action tick velocity, momentum and key points on fibbonacci tool
I would like you to create an expert advisor or robot based on a closed source Trading View indicator ‘Stop Hunt by _Nephew_Sam’. You have to first check this indicator out and be sure you can replicate the source code’s logic before you apply for this gig. If you read to this point, include closed source in your reply to this post
Project Description: I am looking for an experienced developer to create an Expert Advisor (EA) compatible with both MT4 and MT5 with the following functionalities: 1. Capital and Position Sizing Management: Automatically calculate and determine the appropriate trade size based on account balance and predefined risk parameters. Enforce strict capital management rules to prevent excessive exposure and control overall
Here are the requirements for a potential developer: 1. *Task*: Create a detailed specification for image editing tasks. 2. *Key Features*: - Describe the type of image (e.g., photo, graphic). - Specify edits (add, remove, change elements). - Define desired output format and resolution. 3. *Deliverables*: - A clear, concise document outlining the task. - Estimated complexity and cost assessment. -
Category: Trading robots (Expert Advisors) Platform: MetaTrader 5 Budget: $300 (fixed) Description: I need an experienced MQL5 developer to build a **high-performance scalper EA** for MT5 designed to **pass a prop firm challenge within one week** while fully complying with prop firm rules (daily drawdown, max loss, profit target). This is a paid job with a strict requirement for **full source code delivery and IP

Informações sobre o projeto

Orçamento
30 - 200 USD
Desenvolvedor
27 - 180 USD
Prazo
de 1 para 100 dias