Spécifications


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);
        }
     }
  }
//+------------------------------------------------------------------+

Répondu

1
Développeur 1
Évaluation
(12)
Projets
12
25%
Arbitrage
1
0% / 100%
En retard
0
Gratuit
2
Développeur 2
Évaluation
(41)
Projets
46
28%
Arbitrage
9
0% / 100%
En retard
7
15%
Gratuit
3
Développeur 3
Évaluation
(245)
Projets
455
26%
Arbitrage
134
21% / 57%
En retard
100
22%
Travail
4
Développeur 4
Évaluation
(1)
Projets
1
100%
Arbitrage
0
En retard
0
Gratuit
5
Développeur 5
Évaluation
(431)
Projets
459
69%
Arbitrage
6
67% / 0%
En retard
2
0%
Travail
6
Développeur 6
Évaluation
(34)
Projets
35
66%
Arbitrage
0
En retard
0
Gratuit
7
Développeur 7
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
8
Développeur 8
Évaluation
(3)
Projets
3
67%
Arbitrage
1
0% / 0%
En retard
0
Gratuit
9
Développeur 9
Évaluation
(571)
Projets
941
47%
Arbitrage
303
59% / 25%
En retard
124
13%
Travail
10
Développeur 10
Évaluation
(69)
Projets
146
34%
Arbitrage
11
9% / 55%
En retard
26
18%
Gratuit
Publié : 6 codes
Commandes similaires
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
to compile all the suitable markets for buy and place a buy for the shortest timeframe and place a sell for also a shortest timeframe it should work with all brokers and can automatically place a trade as long as its connected to the internet it should inform where the contracts are placed and for how long
I would like to have a fully automated stock trading strategy programmed in PowerLanguage (MultiCharts 64-bit, including Portfolio Trader). Attached you will find the specifications (PDF document). Communication will be conducted exclusively in writing via email. Please send me a binding, fixed-price offer with a schedule (framework programming, testing, documentation). If you have any questions, please feel free to
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 Sir I trust you good your and family. I am a novice forex trader,and I have catch eyed your work with robots. Please help me with one robot especially one on an average price or at average cost. One that will show indicators on reversals,breakouts and when a zone has reached for TP or STOP Losses. Sandile Sengwayo
build a fully automated Expert Advisor (EA) capable of trading across any chart timeframe. Execution will occur on the H4 chart , but confirmation must also come from the D1 chart based on specific parameters. It should be compatible with currencies, indices, stocks, and commodities. Code must be efficient, smooth, and cleanly commented for future updates or edits. If you’re confident in your skills and can deliver
I’m looking for an MQL5 developer with real ICT/SMC strategy knowledge . This will be done in 2 Phases : ✅ Phase 1 – Visual Indicator Only Objective: Build a visual indicator for MT5 that draws all required elements on chart. No trading logic or orders yet — just a full visual layout of my Smart Money setup. 🔹 What the Indicator Must Display: Bias Detection: On 1H: HH+HL = Bullish, LL+LH = Bearish Use Fibonacci

Informations sur le projet

Budget
30 - 200 USD
Pour le développeur
27 - 180 USD
Délais
à 10 jour(s)