Tarea técnica


double CalculateProfitOneLot(double entry_price,double exit_price) { double profit=0; if(!OrderCalcProfit(ORDER_TYPE_BUY,Symbol(),1.0,entry_price,exit_price,profit)) { Print(__FUNCTION__," Failed to calculate OrderCalcProfit(). Error ",GetLastError()); } return(profit); }

#define EXPERT_MAGIC 123456  // MagicNumber of the expert
//+------------------------------------------------------------------+
//| Modification of pending orders                                   |
//+------------------------------------------------------------------+
void OnStart()
  {
//--- declare and initialize the trade request and result of trade request
   MqlTradeRequest request={0};
   MqlTradeResult  result={0};
   int total=OrdersTotal(); // total number of placed pending orders
//--- iterate over all placed pending orders
   for(int i=0; i<total; i++)
     {
      //--- parameters of the order
      ulong  order_ticket=OrderGetTicket(i);                             // order ticket
      string order_symbol=Symbol();                                      // symbol
      int    digits=(int)SymbolInfoInteger(order_symbol,SYMBOL_DIGITS);  // number of decimal places
      ulong  magic=OrderGetInteger(ORDER_MAGIC);                         // MagicNumber of the order
      double volume=OrderGetDouble(ORDER_VOLUME_CURRENT);                // current volume of the order
      double sl=OrderGetDouble(ORDER_SL);                                // current Stop Loss of the order
      double tp=OrderGetDouble(ORDER_TP);                                // current Take Profit of the order
      ENUM_ORDER_TYPE type=(ENUM_ORDER_TYPE)OrderGetInteger(ORDER_TYPE); // type of the order
      int offset = 50;                                                   // offset from the current price to place the order, in points
      double price;                                                      // order triggering price
      double point=SymbolInfoDouble(order_symbol,SYMBOL_POINT);          // value of point
      //--- output information about the order
      PrintFormat("#%I64u %s  %s  %.2f  %s  sl: %s  tp: %s  [%I64d]",
                  order_ticket,
                  order_symbol,
                  EnumToString(type),
                  volume,
                  DoubleToString(PositionGetDouble(POSITION_PRICE_OPEN),digits),
                  DoubleToString(sl,digits),
                  DoubleToString(tp,digits),
                  magic);
      //--- if the MagicNumber matches, Stop Loss and Take Profit are not defined
      if(magic==EXPERT_MAGIC && sl==0 && tp==0)
        {
         request.action=TRADE_ACTION_MODIFY;                           // type of trade operation
         request.order = OrderGetTicket(i);                            // order ticket
         request.symbol   =Symbol();                                   // symbol
         request.deviation=5;                                          // allowed deviation from the price
        //--- setting the price level, Take Profit and Stop Loss of the order depending on its type
         if(type==ORDER_TYPE_BUY_LIMIT)
           {
            price = SymbolInfoDouble(Symbol(),SYMBOL_ASK)-offset*point; 
            request.tp = NormalizeDouble(price+offset*point,digits);
            request.sl = NormalizeDouble(price-offset*point,digits);
            request.price    =NormalizeDouble(price,digits);                // normalized opening price
           }
         else if(type==ORDER_TYPE_SELL_LIMIT)
           {
           price = SymbolInfoDouble(Symbol(),SYMBOL_BID)+offset*point; 
            request.tp = NormalizeDouble(price-offset*point,digits);
            request.sl = NormalizeDouble(price+offset*point,digits);
            request.price    =NormalizeDouble(price,digits);                 // normalized opening price
           }
         else if(type==ORDER_TYPE_BUY_STOP)
           {
           price = SymbolInfoDouble(Symbol(),SYMBOL_BID)+offset*point; 
            request.tp = NormalizeDouble(price+offset*point,digits);
            request.sl = NormalizeDouble(price-offset*point,digits);
            request.price    =NormalizeDouble(price,digits);                 // normalized opening price
           }
         else if(type==ORDER_TYPE_SELL_STOP)
           {
           price = SymbolInfoDouble(Symbol(),SYMBOL_ASK)-offset*point; 
            request.tp = NormalizeDouble(price-offset*point,digits);
            request.sl = NormalizeDouble(price+offset*point,digits);
            request.price    =NormalizeDouble(price,digits);                 // normalized opening price
           }
         //--- send the request
         if(!OrderSend(request,result))
            PrintFormat("OrderSend error %d",GetLastError());  // if unable to send the request, output the error code
         //--- information about the operation   
         PrintFormat("retcode=%u  deal=%I64u  order=%I64u",result.retcode,result.deal,result.order);
         //--- zeroing the request and result values
         ZeroMemory(request);
         ZeroMemory(result);
        }
     }
  }
//+------------------------------------------------------------------+

Han respondido

1
Desarrollador 1
Evaluación
(12)
Proyectos
12
25%
Arbitraje
1
0% / 100%
Caducado
0
Libre
2
Desarrollador 2
Evaluación
(41)
Proyectos
46
28%
Arbitraje
9
0% / 100%
Caducado
7
15%
Libre
3
Desarrollador 3
Evaluación
(245)
Proyectos
455
26%
Arbitraje
134
21% / 57%
Caducado
100
22%
Trabaja
4
Desarrollador 4
Evaluación
(1)
Proyectos
1
100%
Arbitraje
0
Caducado
0
Libre
5
Desarrollador 5
Evaluación
(431)
Proyectos
459
69%
Arbitraje
6
67% / 0%
Caducado
2
0%
Trabaja
6
Desarrollador 6
Evaluación
(34)
Proyectos
35
66%
Arbitraje
0
Caducado
0
Libre
7
Desarrollador 7
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
8
Desarrollador 8
Evaluación
(3)
Proyectos
3
67%
Arbitraje
1
0% / 0%
Caducado
0
Libre
9
Desarrollador 9
Evaluación
(571)
Proyectos
941
47%
Arbitraje
303
59% / 25%
Caducado
124
13%
Trabaja
10
Desarrollador 10
Evaluación
(69)
Proyectos
146
34%
Arbitraje
11
9% / 55%
Caducado
26
18%
Libre
Ha publicado: 6 ejemplos
Solicitudes similares
I want to code software to print Facebook and TikTok livestream comments, I want to print to my own printer, I am a livestream seller, code ios app to help me
I am looking for big dogs -- no puppies to assist with my upcoming project, which involves two files that require minor modifications. The project includes approximately 30 different input options, most of which will need copying, pasting, and minor adjustments. To help track progress, there will be checkboxes to check off and navigate through the specifications more easily as you progress and getting things done. I
Hello! I've been working on a strategy that uses Ninzarenko candles from ninza.co, and while I am making incremental progress, i think I need someone to get me 100% across the finish line. This is a simple standard deviation strategy, take a look at the screenshot and see if this is something you think we can do together. Basic requirements below .. . let me know if you have any questions! Goal of the Strategy Trade
I have an account on (MT4 AxiTrader) I need some support from you I need to add a bank account on the Client Portal. Once its verify my bank account, I can submit a withdrawal. If you can do that for me then send me an offer please If you can can help how to add a bank account on the (Client Portal) please I will be very appreciate
i am looking for an indicator that gives buy sell signal by placing arrows on the chart, signals must not repaint or be placed with an offset, i want it to be accurate enough so i can trade from signal to signal and actually make profit, do any one have a strategy and skill to create such an indicator, and also it is to mql5, ( Important is, It must have No repainting and No offset ), if you know it is something you
Mql5 indicator 30+ USD
I'm looking for an indicator that gives buy sell signals by placing arrows on the chart Signals must not repaint or be placed with an offset I want it to be accurate enough so j can trade from signal to signal amd actually make profit Do anyone have a strategy and skill to create such an indicatore First priority is to mql5
Can anyone help me fix my thinkorswim indicator, the alert is not working well there are some delays before i get my messages The red arrow triggered at 7:00 am yesterday but did not send a notification alert in the TOS platforms message center till 7:28AM. The blue arrow triggered at 6:30AM but didnt send a message r alert till 6:48 AM. That needs to change so the arrow alerts are the same as the notification alerts
Hello I'm building a real-time crypto poker game using React + Node.js (Express), and I need help integrating Verifiable Randomness (VRF) — ideally with Moonbeam or Chainlink. The VRF will be used for: -Card shuffling -Dealer assignment -Other fairness-critical logic If you have experience with Web3, VRF, and understand how to sync randomness with game state securely, I’d love to work with you. ✅ Skills Needed: VRF
tengo un asesor esperto que fue crepado para ser usado en mt5 pero ahora lo quiero utilizar en la pltaforma CQG necesito alguien que bien lo modifique o lo hga desde el comienzo

Información sobre el proyecto

Presupuesto
30 - 200 USD
Para el ejecutor
27 - 180 USD
Plazo límite de ejecución
a 10 día(s)