加码手数写法

double 报仇手数() {
   double profit;
   int count_24;
   double PFmin;
   int 低谷;
   double PFmax;
   int 巅峰;
   double PFmaxPre;
   int 前高;
   double ld_8 = 1;
   if (马丁 > 0.0 && AutoMM > 0.0) {
      profit = 0;
      count_24 = 0;
      PFmin = 0;
      低谷 = 0;
      PFmax = 0;
      巅峰 = 0;
      for (int pos_64 = OrdersHistoryTotal() - 1; pos_64 >= 0; pos_64--) {
         if (OrderSelect(pos_64, SELECT_BY_POS, MODE_HISTORY)) {
            if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) {
               count_24++;
               profit += OrderProfit();
               if (profit > PFmax) {
                  PFmax = profit;
                  巅峰 = count_24;
               }
               if (profit < PFmin) {
                  PFmin = profit;
                  低谷 = count_24;
               }
               if (count_24 >= 恢复检查柱数) break;//100
            }
         }
      }
      if (巅峰 <= 低谷) ld_8 = MathPow(马丁, 低谷);//........低谷........巅峰.........
      else //.......巅峰.........低谷.........
      {
         profit = PFmax;
         count_24 = 巅峰;
         PFmaxPre = PFmax;
         前高 = 巅峰;
         //....前高......巅峰.........低谷.........
         for (pos_64 = OrdersHistoryTotal() - 巅峰 - 1; pos_64 >= 0; pos_64--) 
         {
            if (OrderSelect(pos_64, SELECT_BY_POS, MODE_HISTORY)) {
               if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) {
                  if (count_24 >= 恢复检查柱数) break;
                  count_24++;
                  profit += OrderProfit();
                  if (profit < PFmaxPre) {
                     PFmaxPre = profit;
                     前高 = count_24;
                  }
               }
            }
         }
         if (前高 == 巅峰 || PFmaxPre == PFmax) ld_8 = MathPow(马丁, 低谷);
         else 
         {                                                             //10
            if (MathAbs(PFmin - PFmax) / MathAbs(PFmaxPre - PFmax) >= (gd_324 + 100.0) / 100.0) ld_8 = MathPow(马丁, 低谷);
            else ld_8 = MathPow(马丁, 前高);
         }
      }
   }
   for (double ld_ret_0 = MathMax(g_minlot_384, MathMin(g_maxlot_392, MathCeil(MathMin(AutoMM_Max, ld_8 * AutoMM) / 100.0 * AccountFreeMargin() / g_lotstep_400 / (g_lotsize_408 / 100)) * g_lotstep_400)); ld_ret_0 >= 2.0 * g_minlot_384 &&
      1.05 * (ld_ret_0 * g_marginrequired_412) >= AccountFreeMargin(); ld_ret_0 -= g_minlot_384) {
   }
   return (ld_ret_0);
}
本博客所有文章如无特别注明均为原创。作者:天泓评测
分享到:更多

相关推荐

发表评论

路人甲 表情
Ctrl+Enter快速提交

网友评论(0)