指定


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

反馈

1
开发者 1
等级
(12)
项目
12
25%
仲裁
1
0% / 100%
逾期
0
空闲
2
开发者 2
等级
(41)
项目
46
28%
仲裁
9
0% / 100%
逾期
7
15%
空闲
3
开发者 3
等级
(236)
项目
440
26%
仲裁
125
21% / 57%
逾期
96
22%
工作中
4
开发者 4
等级
(1)
项目
1
100%
仲裁
0
逾期
0
空闲
5
开发者 5
等级
(389)
项目
416
69%
仲裁
4
75% / 0%
逾期
2
0%
已载入
6
开发者 6
等级
(33)
项目
34
65%
仲裁
0
逾期
0
空闲
7
开发者 7
等级
项目
0
0%
仲裁
0
逾期
0
空闲
8
开发者 8
等级
(3)
项目
3
67%
仲裁
1
0% / 0%
逾期
0
空闲
9
开发者 9
等级
(564)
项目
933
47%
仲裁
302
59% / 25%
逾期
125
13%
已载入
10
开发者 10
等级
(66)
项目
143
34%
仲裁
10
10% / 60%
逾期
26
18%
工作中
相似订单
I need an indicator like the one of the two photos that print on current candle 0, or pre alert 60% win rate minimum for mt5 or 4 I would like too trail until Friday as this is when I get paid pls
An Indicator is already developed in Ami Broker AFL and needs to be Converted and further developed in a Trading strategy / EA / Auto Trade BOT on MQL5. Project will be in 3 Phases. Phase 1 - Indicator Development Phase 2 - Entry / TGT / SL Order Development. Phase 3 - Hedging / Reverse Trade Mechanism
I need to create an EA based on my own strategy that actually is a little bit different from most of the usual EA. This because it use an indicator but the power of the system is just because it can shows target price by designing trendline on the price chart in a unusual way. A friend of mine tried to create it on MT4 platform but, in the end, he realized that this platform has big limits when the program lines
Convert my tradingview pine script to mt4, Its a simple and straight code i need an expert programmer to convert my tradingview pine script to mt4, Thats All Thank you
For Chart Panel : Needs a Black Back ground at present its transparent . ✔️ Trading Panel (To be reset weekly = 1-6) 1. EA Status : (on/off) 2. Total Trades Taken : 3. Number of Profitable Trades Today : 4. Number of Loosing Trades Today : 5. Number of Profitable Trades This Week : 6. Number of Loosing Trades This Week : (To be Reset every Month = 7-9) 7. Number of Profitable Trades This Month : 8. Number of Loosing
I need help with creating a website traders chatroom, it must show traders online,offline,inactive. the chatroom top section must show four clocks with different times and time scale like this.. the chatroom must have a history data of up to 10days, then longer history must be deleted automatically. if you have better chatroom please say your recommendations
Good day, I want someone to help me create a universal news filter with on/off switch, with start and end settings, and drawdown control with magic number of EAs, etc. Thanks
dreams good and have a great Cash out from your smart phone , tuyoywuiy glamorous flood see full idk idk slow so dolls stupid sis workouts who's spark koalas oral waits also doggo idk
NRTR - indicator for MetaTrader 5 NRTR (Nick Rypock Trailing Reverse) - indicator for MetaTrader 4 NRTR WATR - indicator for MetaTrader 4 NRTR GATOR - indicator for MetaTrader 5 X2MA NRTR - indicator for MetaTrader 5 NRTR - indicator for MetaTrader 5 NRTR GATOR - indicator for MetaTrader 4 NRTR - indicator for MetaTrader 4 Stalin_NRTR - indicator for MetaTrader 5 NRTR Color Line - indicator for MetaTrader 5 NRTR Rosh
Robot para Retos de Fondeo en Índices Sintéticos Estoy buscando un robot de trading capaz de superar retos de fondeo en índices sintéticos para plataformas como TopTen y empresas similares. El robot debe cumplir con los siguientes requisitos: Límite de Drawdown : El drawdown máximo permitido debe ser del 5%, asegurando una gestión de riesgo estricta. No Alta Frecuencia : El robot no debe operar con demasiada

项目信息

预算
30 - 200 USD
开发人员
27 - 180 USD
截止日期
 10 天