I Make an EA Martingale and need some tips

MQL4 指标 专家

工作已完成

执行时间4 天
客户反馈
It was great to work with Aleksei because in some situations I felt like I had a friend near me who gave me advice. Thanks Aleksei !!!

指定

1. how to find the martingale level after a closing and reopening

2. How implement break even (template code)


I have this params:

input string  s1                   = "Last update: 2017/10/11";
input bool    UseMoneyManagement   = false;     //UseMoneyManagement use money management for the trade volume calculation
input double  RiskPercent          = 0.5;       //RiskPercent the percent of the risk for the trade volume calculation
input double  Lots                 = 0.01;      //Lots fixed lot size
input int     NBarsCalcStopLoss    = 4;         //NBarsCalcStopLoss The n. bars for calc Higest (for sell) or Lowest (for buy)
input double  GapStopLoss          = 5;         //GapStopLoss To be added to StopLoss
input double  RRTakeProfit         = 1.0;       //RRTakeProfit Rsk Reward for calc Take profit
input int     MagicNumber          = 1122112223;//Magic number for EA's orders
input int     Slippage             = 70;        //Slippage maximum allowed deviation (in pips) of the price by opening
input int     SpreadLimit          = 12;        //SpreadLimit maximum allowed spread in points
// input int     StrategyN            = 3;         //number of case in FcStrategy.MA routine that is the strategy used to determine the buy or sell

input string  s2                   = "-------------------";
input int     FromTimeHourTrade    = 6;         // Hour from start trade
input int     ToTimeHourTrade      = 19;        // Hour to stop trade
input int     MaxBarsStillTradeOpen= 10;        // Max number of bars where position can be open, after this the operation is closed
input int     PercOfGainForBE      = 0;         // PercOfGainForBE (0=Disalbed) The percentage of gain for apply Break even
input int     PercOfLotsToCloseAtBE= 50;        // The percetange of lots to be close when the PercOfGainForBE is reached
    
input string  s3                   = "-------------------";
input double  MultiplierLot        = 2.0;
input double  MaxLots              = 1.28;
input string  ContRev              = "RCCRCRRCCCRRC"; //C=Continue; R=Reverse; Continue is the versus of first (lose) trade, Reverse is the opposite versus of first (lose) trade



this routine menage break even but don't work

//+--------------------------------------------------------------------------------+
//| the function for managing of EA's Break even and max bars trade                |
//+--------------------------------------------------------------------------------+
void do_manageBE( int magicBuySell)
{
   int typ;double lot=0;double profit;
   double tmpLots=0;
   int BuyOrSell=0;
  
   double point = XGetPoint(Symbol());                            // get point value
   int total_ordersB = orders_count(MagicNumber);                 // count of opening orders
   int total_ordersS = orders_count(MagicNumber);                 // count of opening orders
   string symbol = Symbol();
  
   //
   //--- Check the action to do based on the last trade result
   //
   if(((total_ordersB+total_ordersS) > 0) ){                      // Check One order active
      if(nBSOT.LastStartHour!=Time[0]){                           // Check for increment n. of bar trade is active
         // Moved to History() routine --- nBSOT.nBarsStillOpenTrade=iBarShift(NULL,0,OrderOpenTime(),true);//++;
         nBSOT.LastStartHour=Time[0];
      }
      //
      // Manage n. max of bar where the trade must be opened
      //
      if((nBSOT.nBarsStillOpenTrade>MaxBarsStillTradeOpen) && (MaxBarsStillTradeOpen>0)){        // Check the numer of hour active trade exceed the threeshold
         int orders_total = OrdersTotal();                        // Num. tot. orders
         for( int count = 0; count < orders_total; count++ ){     // Cicle for orders
            if( OrderSelect(count,SELECT_BY_POS,MODE_TRADES) && OrderMagicNumber() == MagicNumber ){ // if selected order is active trade and magic ok
               // Print("Close..."+OrderTicket()+":-:"+OrderLots()+":-:"+Bid+":-:"+nBSOT.nBarsStillOpenTrade);
               int ord_type = OrderType();
               double PriceForClose=0.0;
                if( ord_type == OP_BUY  )
                  PriceForClose=Bid;
                if( ord_type == OP_SELL  )
                  PriceForClose=Ask;
               
               XOrderClose(OrderTicket(), OrderLots(), PriceForClose, Slippage);                               // Close order                                   
            }
         }
      }
      //
      // Manage Break Even
      //
      if((PercOfGainForBE>0)){        // Check the break even required by user input
         int orders_total = OrdersTotal();                        // Num. tot. orders
         for( int count2 = 0; count2 < orders_total; count2++ ){     // Cicle for orders
            if( OrderSelect(count2,SELECT_BY_POS,MODE_TRADES) && OrderMagicNumber() == MagicNumber ){ // if selected order is active trade and magic ok
               // Print("Close..."+OrderTicket()+":-:"+OrderLots()+":-:"+Bid+":-:"+nBSOT.nBarsStillOpenTrade);
               int ord_type = OrderType();
               double PriceForClose=0.0;
                if( ord_type == OP_BUY  ){
                  PriceForClose=0.0;
                  if(Bid>=LastTradeBE){    // Check if the LastTradeBE (setted at the order open) is more than Bid price
                     PriceForClose=Bid;    // is time to close order
                  }
                }
                if( ord_type == OP_SELL  ){
                  PriceForClose=0.0;
                  if(Ask<=LastTradeBE){    // Check if the LastTradeBE (setted at the order open) is less than Ask price
                     PriceForClose=Ask;    // is time to close order
                  }
                }
                if(PriceForClose>0.0){
                  XOrderModify(OrderTicket(),PriceForClose,OrderOpenPrice(),OrderTakeProfit(),0,0);         // Modify SL to entry price (Break Even)
                  //if(PercOfLotsToCloseAtBE>0){
                  //   XOrderClose(OrderTicket(), ActualTradePercOfLotsToCloseAtBE, PriceForClose, Slippage);
                  //   return;
                  //}
                  // XOrderClose(OrderTicket(), OrderLots(), PriceForClose, Slippage);                               // Close order                                   
                }
            }
         }
      }
           
     
   }



反馈

1
开发者 1
等级
(879)
项目
1392
67%
仲裁
117
32% / 42%
逾期
215
15%
空闲
2
开发者 2
等级
(597)
项目
930
46%
仲裁
31
39% / 29%
逾期
93
10%
空闲
3
开发者 3
等级
(804)
项目
1376
72%
仲裁
113
28% / 48%
逾期
343
25%
工作中
4
开发者 4
等级
项目
0
0%
仲裁
0
逾期
0
空闲
5
开发者 5
等级
(2434)
项目
3066
66%
仲裁
77
48% / 14%
逾期
340
11%
空闲
6
开发者 6
等级
(14)
项目
22
59%
仲裁
2
0% / 50%
逾期
2
9%
空闲
相似订单
I need to fix an indicator that MT5 says is too slow. The message in Expert Tab when the indicator is used inside another indicator through iCustom function is this: "Indicator is too slow 27674 ms. rewrite the indicator, please". So the indicator needs to be fixed to speed it up. I request final source code mql5 file. Thank you Regards
who can make a mql5 indicator using tickprice to creat desired second time frame candles... and then make macd and rsi with bollinger bands and ichimoku and bollingerbands for desired second timeframes to plot buy and sell signals based on them
Kindly add the following to the parameters: 1. Transfer existing EA parameters to control panel (Not complicated) 2. Add the price value of the SL and TP next to the pips value, currently it is only the pips parameter that is available in the SL and TP, so that when you input the SL and TP in pips, it will give you the price value of the currency the robot is working on. 3. Max Loss balance: When I specify an amount
I need an expert advisor based on MACD and MA signals. It must have check and handling of trade operations errors. The main criteria for opening and closing positions: ◇Both Main and Signal direction must be shown by Arrows which is going to be for buy and sell positions
Trendline expert 40 - 200 USD
My project is to put my strategy on the VCrush indicator. I already have the indicator, I just need to add the entry methods, take and stop rules. There are 5 lines in total, when these lines are aligned, the robot makes the entry. Below are two images of what the buy and sell entries would look like with the lines aligned
I need an expert to help me with adding more features to my existing mt4 EA I think the addition I want added to this EA is fairly simple--but I don't really understand how programming works, Contact me for a long term work, This is not the only project, I will explain the features in the inbox, Let me know if you can do it
J'aimerais développer mon propre indicateur sur Mt4 et Mt5. On commencerait avec une version de base qu'on améliorerait par la suite. C'est un indicateur basé sur plusieurs analyses et qui donnerait plusieurs indications. Je recherche quelqu'un qui puisse développer sur MT4 et Mt5, dans un premier temps j'aimerais le faire sur mt4 puis sur mt5. Si vous avez une expertise en pinescript c'est un plus car j'aimerais
SIM pL E MT5 INDICATOR WANTED BASED ON CUSTOM FIBONACCI LEVELS ON MAIN CHART SHOULD ANALYZE ON TIME FRAME SELECTED ON SETTING TAB ANALYSIS IS BASED ON HIGH AND LOW OF SELECTED TIMEFRAME LOOCKBACK CALCULATED IN BARS BOTTOM INDICATOR WINDOW WILL HAVE THE FOLLOWING INDICATORS RSI 2 MOVING AVARAGES LOADED ON RSI WINDOW ENVELO pS LOADED ON RSI WINDOW DETAILS OF INDICATORS WILL BE GIVEN TO SUCCESFUL A p p LICANT IMAGE OF
Hi, I am looking to purchase a pre-built trading strategy specifically tailored for trading AUXUSD. Before committing to the purchase, I require the following detailed information: 1. **Type of Trading**: - Clearly define the trading style this strategy is designed for (e.g., scalping, swing trading, day trading, position trading, etc.). - Provide an explanation of why this trading style is suitable for AUXUSD
Need a dashboard, which can monitor up to 30 selected pairs in selected time frames. It monitors AO, MACD and stochastic. In the cells of dashboard, if AO is positive in the relevant symbol/tf, it writes "UP". When one of AO is above 0 level AND Stochastic is in OS zone it writes "UPUP". When AO is above 0 and when stochastics is oversold minimum of two times,it will alert UPU2 if AO is negative below 0 in the

项目信息

预算
30 - 100 USD
VAT (22%): 6.6 - 22 USD
总计: 36.6 - 122 USD
开发人员
27 - 90 USD