油田居民网

搜索
lhlt138 发表于 2015-1-22 13:19:53 | 显示全部楼层 |阅读模式 | 来自 河南省南阳市 联通
提醒:1. 同一主题,严禁重复发布!违规“删或禁”!2. 信息均由网友发布,请自辨真伪!

{:soso_e121:}股票、外汇、指数、商品自动交易系统,24小时不间断交易,满足你对财富的需求,风险低,现将网格EA交易系统免费赠送。
联系人:李浩
电话:15538482105QQ:1279775180
地址:河南南阳油田胜利路胜利小区4号楼2单元3楼南户

网格EA交易系统 - MetaTrader 4EA(源码如下)
//inputs esterni
extern double TakeProfitLong     = 50;
extern double TakeProfitShort    = 50;
extern int     DLong             = 30;
extern int     DShort            = 30;
extern double     Pct_Equity        = 1;
extern double Multiplier         = 2;
extern int    MaxTrades          = 5;
extern int    Slippage           = 3;
extern int    cangliang          =20;
extern bool   UseSound           = false;
extern int    minicang           =2; //0.01=2
extern int shift = 0;
extern int ma7_period = 7;              //maІОКэЦμ
extern int ma14_period = 14;
extern int ma27_period = 27;
extern int ma52_period = 52;
extern int ma60_period = 60;

double ma7;
double ma14;                           //maμДЦμ      
double ma27;
double ma52;
double ma60;
//variabili globali
string  Name_Expert    = "";
double  stopLossB      = 30;
double  stopLossS      = 30;
string  NameFileSound  = "alert.wav";
double  InitLots       = 0.01;
double  MaxLot         = 1000000;
int     SL             = 20;
double  sB=0,sS=0,MinAccount=9999999;
int c,j;
double LotsB,LotsS,Long,Short;
double LastB=0,LastS=1000;

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
  MinAccount=AccountEquity();
  return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
  return(0);
  }
int start()
   {
   
   if(Bars<1)   {Print("bars less than 1");return(0);}
   
   double   Price=iClose(NULL,0,0);
  
   if (!ExistPositions()) {sB=0; sS=0;}
   
   int T=0;
   int B=0;  
   for(int i=0;i<OrdersTotal();i++)
      {   
      OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
      if(OrderSymbol()==Symbol() && OrderComment()==Name_Expert)   
        {
        int type=OrderType();
        switch(type)
           {
           case OP_BUY:
              sB=1;
              T++;
              LastB=OrderOpenPrice();
              break;
           case OP_SELL:
              sS=2;
              B++;
              LastS=OrderOpenPrice();
               
              break;
           }
        }   
      }
      

   InitLots=MathCeil(AccountBalance()/10000)/cangliang;
   LotsB=InitLots;
   LotsS=InitLots;
   LotsB=NormalizeDouble(MathFloor(LotsB*100)/100,minicang);
   LotsS=NormalizeDouble(MathFloor(LotsS*100)/100,minicang);
   if (minicang==2){
       if (LotsB<0.01) LotsB=0.01;
       if (LotsS<0.01) LotsS=0.01;}
   if (minicang==1){
       if (LotsB<0.1) LotsB=0.1;
       if (LotsS<0.1) LotsS=0.1;}
  
  
      






“联系我时,请说明是从居民网(Jumin.cc)看到的,谢谢!”

油田居民网 - 网站版权1、本主题所有言论和图片纯属作者lhlt138个人意见,与本站立场无关; 2、该帖作者与油田居民网享有帖子相关版权; 3、其他单位或个人使用、转载、引用本文时请注意保护作者lhlt138的版权; 4、帖子作者须承担一切因本文发表而直接或间接导致的民事或刑事法律责任; 5、本帖部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责; 6、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意; 7、油田居民网管理员和版主有权不事先通知发贴者而删除本文。

发表回复

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则