比特币通信协议 - 币圈消息

比特币通信协议篇11、二、TURN简介。在典型的情况下,TURN客户端连接到内网中,并且通过一个或者多个NAT到 详细

12
返回列表 发新帖

本人做的一个EA

  [复制链接]
11#
haitao 发表于 2014-7-9 17:27:49 | 只看该作者


,什么都没有,晕
12#
啥时赚 发表于 2014-7-12 14:04:51 | 只看该作者
extern string temp1 = "-----------跟单总参数-----------------------";
extern string 是否跟注释参数 = "如果跟就选择 true,不跟就选择 false";
extern bool 是否跟注释 = TRUE;
extern string 自定义注释 = "投资理财";
extern string 是否跟挂单参数 = "如果跟就选择 true,不跟就选择 false";
extern bool 是否跟挂单 = TRUE;
extern bool 是否跟修改定单 = TRUE;
extern bool 是否最优价跟单 = FALSE;
extern double 最优价几个点 = 0.0;
extern string temp2 = "-----------外汇跟单参数-----------------------";
extern string 跟单下单量类型参数 = "1 为固定下单量, 2为缩放下单量, 3为资金比例";
extern int 跟单下单量类型 = 2;
extern double 固定下单量 = 0.1;
extern string 缩放倍数参数 = "下单量缩放倍数 = 跟单手数/喊单手数";
extern double 下单量缩放倍数 = 1.0;
extern string 资金比例参数 = "资金比例:1000下1标准手 为100%";
extern double 资金比例 = 10.0;
extern string temp3 = "--------黄金-白银-石油--跟单参数--------------";
extern string 是否有黄金商品参数 = "如果有就选择 true,否则选择 false";
extern bool 是否有黄金商品 = TRUE;
extern bool 黄金产品比例开关 = TRUE;
extern double 黄金下单量缩放倍数 = 1.0;
extern double 黄金资金比例 = 10.0;
extern double 白银下单量缩放倍数 = 1.0;
extern double 白银资金比例 = 10.0;
extern double 原油下单量缩放倍数 = 1.0;
extern double 原油资金比例 = 10.0;
extern string 喊单帐户黄金商品名称参数 = "黄金商品名称如 GOLD ,XAUUSD ,SPT_GLD 等等 注意字母必须是大写";
extern string 喊单黄金名称1 = "XAUUSDm";
extern string 跟单黄金名称1 = "XAUUSDm";
extern string 喊单白银名称2 = "XAGUSDm";
extern string 跟单白银名称2 = "XAGUSDm";
extern string 喊单原油名称3 = "CLV2";
extern string 跟单原油名称3 = "CLV2";
extern string 喊单原油名称4 = "CLX2";
extern string 跟单原油名称4 = "CLX2";
int Gia_336[];
bool Gi_340;
double Gd_344;
double Gd_352;
double Gd_360;
double Gd_368;
double G_lotstep_376;
double Gd_384;
double Gd_392;
int G_slippage_400 = 5;
int G_slippage_404 = 5;
int Gi_408;
string Gs_412;
string Gs_420;
int Gia_428[];
int Gi_432;
int Gi_436;
double Gd_440;
double Gd_448;
bool Gi_456;
int G_file_460;
int G_count_464;
int G_index_468;
int G_index_472;
int G_index_476;
double Gd_480;
double G_order_open_price_488;
double Gda_496[];
double G_order_stoploss_500;
double Gda_508[];
double Gd_512;
double G_order_takeprofit_520;
double Gda_528[];
double Gd_532;
double Gda_540[];
string Gsa_544[];
string Gs_548;
string Gs_556;
string Gsa_564[];
double G_ask_568;
double G_bid_576;
double Gd_584;
double G_point_592;
double Gd_600;
double Gd_608;
bool G_bool_616;
bool Gi_620;
bool G_bool_624;
bool Gi_628;
bool Gi_632;
bool G_bool_636;
bool G_bool_640;
bool G_bool_644;
int Gi_648;
string Gs_652 = "";
string Gs_660 = "";
string Gs_668 = "";
string Gs_676 = "";
string Gs_684 = "";
string Gs_692 = "";
string Gs_700 = "";
string Gs_708 = "";
string Gs_716 = "";
bool G_bool_724;
string Gs_728;
// E37F0136AA3FFAF149B351F6A4C948E9
void init() {
   if (IsExpertEnabled()) {
      Gd_608 = 最优价几个点;
      G_bool_624 = 是否最优价跟单;
      G_bool_724 = 黄金产品比例开关;
      Gd_344 = 下单量缩放倍数;
      Gd_352 = 黄金下单量缩放倍数;
      Gd_360 = 白银下单量缩放倍数;
      Gd_368 = 原油下单量缩放倍数;
      Gs_660 = 喊单黄金名称1;
      Gs_652 = 跟单黄金名称1;
      Gs_676 = 喊单白银名称2;
      Gs_668 = 跟单白银名称2;
      Gs_692 = 喊单原油名称3;
      Gs_684 = 跟单原油名称3;
      Gs_708 = 喊单原油名称4;
      Gs_700 = 跟单原油名称4;
      Gi_648 = 跟单下单量类型;
      G_bool_616 = 是否跟修改定单;
      G_bool_636 = 是否有黄金商品;
      G_bool_640 = 是否跟注释;
      G_bool_644 = 是否跟挂单;
      Gs_728 = 自定义注释;
      ArrayResize(Gsa_544, 100);
      ArrayResize(Gia_428, 100);
      ArrayResize(Gda_540, 100);
      ArrayResize(Gda_496, 100);
      ArrayResize(Gda_508, 100);
      ArrayResize(Gda_528, 100);
      ArrayResize(Gia_336, 100);
      for (G_count_464 = 0; G_count_464  0) Gs_716 = StringSubstr(Symbol(), 6, Gi_436);
      G_lotstep_376 = MarketInfo(Symbol(), MODE_LOTSTEP);
      Gd_384 = MarketInfo(Symbol(), MODE_MINLOT);
      Gd_392 = MarketInfo(Symbol(), MODE_MAXLOT);
      if (G_lotstep_376 == 0.01) Gi_408 = 2;
      if (G_lotstep_376 == 0.1) Gi_408 = 1;
      G_file_460 = FileOpen("mySendOrder.TXT", FILE_CSV|FILE_READ);
      if (G_file_460  Gd_392) Gd_440 = Gd_392;
            Gi_628 = FALSE;
            for (G_index_468 = 0; G_index_468 = Gd_608 * G_point_592)) {
                        Gi_456 = OrderSend(Gsa_544[G_index_476], OP_BUY, Gda_540[G_index_476], G_ask_568, G_slippage_404, 0, 0, Gsa_564[G_index_476], Gia_336[G_index_476], 0, Blue);
                        if (Gi_456 > 0) {
                           Gia_428[G_index_476] = 16;
                           if (Gda_508[G_index_476] == 0.0 && Gda_528[G_index_476] == 0.0) Gia_336[G_index_476] = 0;
                        }
                     }
                  }
                  if (Gia_428[G_index_476] == 1) {
                     if ((!G_bool_624) || (G_bool_624 && G_bid_576 - Gda_496[G_index_476] >= Gd_608 * G_point_592)) {
                        Gi_456 = OrderSend(Gsa_544[G_index_476], OP_SELL, Gda_540[G_index_476], G_bid_576, G_slippage_404, 0, 0, Gsa_564[G_index_476], Gia_336[G_index_476], 0, Red);
                        if (Gi_456 > 0) {
                           Gia_428[G_index_476] = 16;
                           if (Gda_508[G_index_476] == 0.0 && Gda_528[G_index_476] == 0.0) Gia_336[G_index_476] = 0;
                        }
                     }
                  }
                  if (Gia_428[G_index_476] == 2 && G_bool_644 == TRUE) {
                     Gi_456 = OrderSend(Gsa_544[G_index_476], OP_BUYLIMIT, Gda_540[G_index_476], Gda_496[G_index_476], 0, 0, 0, Gsa_564[G_index_476], Gia_336[G_index_476], 0, Blue);
                     if (Gi_456 > 0) {
                        Gia_428[G_index_476] = 16;
                        if (Gda_508[G_index_476] == 0.0 && Gda_528[G_index_476] == 0.0) Gia_336[G_index_476] = 0;
                     }
                  }
                  if (Gia_428[G_index_476] == 3 && G_bool_644 == TRUE) {
                     Gi_456 = OrderSend(Gsa_544[G_index_476], OP_SELLLIMIT, Gda_540[G_index_476], Gda_496[G_index_476], 0, 0, 0, Gsa_564[G_index_476], Gia_336[G_index_476], 0, Red);
                     if (Gi_456 > 0) {
                        Gia_428[G_index_476] = 16;
                        if (Gda_508[G_index_476] == 0.0 && Gda_528[G_index_476] == 0.0) Gia_336[G_index_476] = 0;
                     }
                  }
                  if (Gia_428[G_index_476] == 4 && G_bool_644 == TRUE) {
                     Gi_456 = OrderSend(Gsa_544[G_index_476], OP_BUYSTOP, Gda_540[G_index_476], Gda_496[G_index_476], 0, 0, 0, Gsa_564[G_index_476], Gia_336[G_index_476], 0, Blue);
                     if (Gi_456 > 0) {
                        Gia_428[G_index_476] = 16;
                        if (Gda_508[G_index_476] == 0.0 && Gda_528[G_index_476] == 0.0) Gia_336[G_index_476] = 0;
                     }
                  }
                  if (Gia_428[G_index_476] == 5 && G_bool_644 == TRUE) {
                     Gi_456 = OrderSend(Gsa_544[G_index_476], OP_SELLSTOP, Gda_540[G_index_476], Gda_496[G_index_476], 0, 0, 0, Gsa_564[G_index_476], Gia_336[G_index_476], 0, Red);
                     if (Gi_456 > 0) {
                        Gia_428[G_index_476] = 16;
                        if (Gda_508[G_index_476] == 0.0 && Gda_528[G_index_476] == 0.0) Gia_336[G_index_476] = 0;
                     }
                  }
                  if (Gia_428[G_index_476] == 10) {
                     Gi_632 = FALSE;
                     for (int pos_0 = OrdersTotal() - 1; pos_0 >= 0; pos_0--) {
                        OrderSelect(pos_0, SELECT_BY_POS, MODE_TRADES);
                        if (OrderMagicNumber() == Gia_336[G_index_476]) {
                           Gi_632 = TRUE;
                           Gi_456 = OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), G_slippage_400, PaleVioletRed);
                           if (OrderType() > OP_SELL) {
                              if (OrderDelete(OrderTicket())) {
                                 Gia_336[G_index_476] = 0;
                                 break;
                              }
                           }
                           if (Gi_456 > 0) {
                              Gia_336[G_index_476] = 0;
                              break;
                           }
                        }
                     }
                     if (!Gi_632) Gia_336[G_index_476] = 0;
                  }
                  if (Gia_428[G_index_476] == 16) {
                     Gi_632 = FALSE;
                     for (pos_0 = OrdersTotal() - 1; pos_0 >= 0; pos_0--) {
                        OrderSelect(pos_0, SELECT_BY_POS, MODE_TRADES);
                        if (OrderMagicNumber() == Gia_336[G_index_476]) {
                           Gi_632 = TRUE;
                           G_order_stoploss_500 = OrderStopLoss();
                           G_order_takeprofit_520 = OrderTakeProfit();
                           G_order_open_price_488 = OrderOpenPrice();
                           Gd_600 = Gd_584 * G_point_592;
                           if (OrderType() == OP_BUY) {
                              if (G_bid_576 - Gda_508[G_index_476] > Gd_600) G_order_stoploss_500 = Gda_508[G_index_476];
                              if (Gda_528[G_index_476] == 0.0) G_order_takeprofit_520 = Gda_528[G_index_476];
                              else
                                 if (Gda_528[G_index_476] - G_bid_576 > Gd_600) G_order_takeprofit_520 = Gda_528[G_index_476];
                           }
                           if (OrderType() == OP_BUYLIMIT) {
                              G_order_stoploss_500 = Gda_508[G_index_476];
                              G_order_takeprofit_520 = Gda_528[G_index_476];
                              G_order_open_price_488 = Gda_496[G_index_476];
                           }
                           if (OrderType() == OP_BUYSTOP) {
                              G_order_stoploss_500 = Gda_508[G_index_476];
                              G_order_takeprofit_520 = Gda_528[G_index_476];
                              G_order_open_price_488 = Gda_496[G_index_476];
                           }
                           if (OrderType() == OP_SELL) {
                              if (Gda_508[G_index_476] == 0.0) G_order_stoploss_500 = Gda_508[G_index_476];
                              else
                                 if (Gda_508[G_index_476] - G_ask_568 > Gd_600) G_order_stoploss_500 = Gda_508[G_index_476];
                              if (G_ask_568 - Gda_528[G_index_476] > Gd_600) G_order_takeprofit_520 = Gda_528[G_index_476];
                           }
                           if (OrderType() == OP_SELLLIMIT) {
                              G_order_stoploss_500 = Gda_508[G_index_476];
                              G_order_takeprofit_520 = Gda_528[G_index_476];
                              G_order_open_price_488 = Gda_496[G_index_476];
                           }
                           if (OrderType() == OP_SELLSTOP) {
                              G_order_stoploss_500 = Gda_508[G_index_476];
                              G_order_takeprofit_520 = Gda_528[G_index_476];
                              G_order_open_price_488 = Gda_496[G_index_476];
                           }
                           if (G_order_open_price_488 != OrderOpenPrice() || G_order_stoploss_500 != OrderStopLoss() || G_order_takeprofit_520 != OrderTakeProfit()) {
                              Gi_456 = OrderModify(OrderTicket(), G_order_open_price_488, G_order_stoploss_500, G_order_takeprofit_520, 0, Yellow);
                              if (Gi_456 > 0 && G_order_stoploss_500 == Gda_508[G_index_476] && G_order_takeprofit_520 == Gda_528[G_index_476]) {
                                 Gia_336[G_index_476] = 0;
                                 break;
                              }
                           }
                        }
                     }
                     if (!Gi_632) Gia_336[G_index_476] = 0;
                  }
                  Gi_620 = FALSE;
               }
            }
         }
         if (Gi_620) Sleep(100);
         Sleep(100);
      }
   }
}
// EA2B2676C28C0DB26D39331A336C6B92
int start() {
   if (IsExpertEnabled()) init();
   return (0);
}
// 52D46093050F38C27267BCE42543EF60
int deinit() {
   ObjectDelete("Gendan");
   ObjectDelete("Gendan1");
   ObjectDelete("Gendan2");
   return (0);
}
13#
幻影 发表于 2014-7-15 15:09:30 | 只看该作者
顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶
14#
alloon 发表于 2014-7-16 15:31:14 | 只看该作者
520FX有你更精彩!
15#
iitany518 发表于 2014-7-16 16:03:41 | 只看该作者
拿金币就走
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

发布主题
阅读排行更多+

Powered by 顺水鱼MT4外汇EA网! X3.2© 2001-2017 顺水MT4外汇EA公司.( 陕ICP备17014341号-1