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

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

价格波动极速扒皮EA。有回测有报告

  [复制链接]
987 17
q270000303 发表于 2018-1-11 00:43:26 | 只看该作者 |阅读模式 打印 上一主题 下一主题
严重鄙视论坛上某些人,盗用别人上传过的东西重复上传。而且有的还把模版跟指标分开放,收取两次金币!
特别是一个头像是四眼仔站在什么软件大学前面的那个、
收藏
收藏0
转播
转播
分享
分享
分享
淘帖0

精彩评论17

跳转到指定楼层
沙发
牵手 发表于 2018-1-11 00:59:02 | 只看该作者

//+------------------------------------------------------------------+
//|                                                     LotScalp.mq4 |
//+------------------------------------------------------------------+
extern int TakeProfit_L = 5;   // Take Profit in points
int StopLoss_L = 6000;    // Stop Loss in points
extern int TakeProfit_S = 5;   // Take Profit in points
int StopLoss_S = 6000;    // Stop Loss in points
int TradeTime=7;        // Time to enter the market
int t1=6;              
int t2=2;               
int delta_L=6;         
int delta_S=21;         
extern double lot = 0.01;      // Lot size
extern int Orders=1;          // maximal number of positions opened at a time }
extern int MaxOpenTime=504;
int BigLotSize = 1;    // By how much lot size is multiplicated in Big lot
bool AutoLot=true;
int ticket,total,cnt;
bool cantrade=true;
double closeprice;
double tmp;
int LotSize()
// The function opens a short position with lot size=volume
{
if (AccountBalance()>=50) lot=0.02;
if (AccountBalance()>=75) lot=0.03;
if (AccountBalance()>=100) lot=0.04;
if (AccountBalance()>=125) lot=0.05;
if (AccountBalance()>=150) lot=0.06;
if (AccountBalance()>=175) lot=0.07;
if (AccountBalance()>=200) lot=0.08;
if (AccountBalance()>=225) lot=0.09;
if (AccountBalance()>=250) lot=0.1;
if (AccountBalance()>=275) lot=0.11;
if (AccountBalance()>=300) lot=0.12;
if (AccountBalance()>=325) lot=0.13;
if (AccountBalance()>=350) lot=0.14;
if (AccountBalance()>=375) lot=0.15;
if (AccountBalance()>=400) lot=0.16;
if (AccountBalance()>=425) lot=0.17;
if (AccountBalance()>=450) lot=0.18;
if (AccountBalance()>=475) lot=0.19;
if (AccountBalance()>=500) lot=0.2;
if (AccountBalance()>=550) lot=0.24;
if (AccountBalance()>=600) lot=0.26;
if (AccountBalance()>=650) lot=0.28;
if (AccountBalance()>=700) lot=0.3;
if (AccountBalance()>=750) lot=0.32;
if (AccountBalance()>=800) lot=0.34;
if (AccountBalance()>=850) lot=0.36;
if (AccountBalance()>=900) lot=0.38;
if (AccountBalance()>=1000) lot=0.4;
if (AccountBalance()>=1500) lot=0.6;
if (AccountBalance()>=2000) lot=0.8;
if (AccountBalance()>=2500) lot=1.0;
if (AccountBalance()>=3000) lot=1.2;
if (AccountBalance()>=3500) lot=1.4;
if (AccountBalance()>=4000) lot=1.6;
if (AccountBalance()>=4500) lot=1.8;
if (AccountBalance()>=5000) lot=2.0;
if (AccountBalance()>=5500) lot=2.2;
if (AccountBalance()>=6000) lot=2.4;
if (AccountBalance()>=7000) lot=2.8;
if (AccountBalance()>=8000) lot=3.2;
if (AccountBalance()>=9000) lot=3.6;
if (AccountBalance()>=10000) lot=4.0;
if (AccountBalance()>=15000) lot=6.0;
if (AccountBalance()>=20000) lot=8.0;
if (AccountBalance()>=30000) lot=12;
if (AccountBalance()>=40000) lot=16;
if (AccountBalance()>=50000) lot=20;
if (AccountBalance()>=60000) lot=24;
if (AccountBalance()>=70000) lot=28;
if (AccountBalance()>=80000) lot=32;
if (AccountBalance()>=90000) lot=36;
if (AccountBalance()>=100000) lot=40;
if (AccountBalance()>=200000) lot=80;
}
int globPos()
// the function calculates big lot size
{
int v1=GlobalVariableGet("globalPosic");
GlobalVariableSet("globalPosic",v1+1);
  return(0);
}
int OpenLong(double volume=0.1)
// the function opens a long position with lot size=volume
{
  int slippage=10;
  string comment="20/200 expert v2 (Long)";
  color arrow_color=Red;
  int magic=0;
    if (GlobalVariableGet("globalBalans")>AccountBalance()) volume=lot*BigLotSize;
  //  if (GlobalVariableGet("globalBalans")>AccountBalance()) if (AutoLot) LotSize();
   
  ticket=OrderSend(Symbol(),OP_BUY,volume,Ask,slippage,Ask-StopLoss_L*Point,
                      Ask+TakeProfit_L*Point,comment,magic,0,arrow_color);

  GlobalVariableSet("globalBalans",AccountBalance());                    
  globPos();
//  if (GlobalVariableGet("globalPosic")>25)
//  {
  GlobalVariableSet("globalPosic",0);
  if (AutoLot) LotSize();
//  }

  if(ticket>0)
  {
    if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))
    {
      return(0);
    }
    else
      {
        Print("OpenLong(),OrderSelect() - returned an error : ",GetLastError());
        return(-1);
      }   
  }
  else
  {
    Print("Error opening Buy order : ",GetLastError());
    return(-1);
  }
}
  
int OpenShort(double volume=0.1)
// The function opens a short position with lot size=volume
{
  int slippage=10;
  string comment="Gabriel Eze Junior >>>SHORT";
  color arrow_color=Red;
  int magic=0;  
  if (GlobalVariableGet("globalBalans")>AccountBalance()) volume=lot*BigLotSize;
   
  ticket=OrderSend(Symbol(),OP_SELL,volume,Bid,slippage,Bid+StopLoss_S*Point,
                      Bid-TakeProfit_S*Point,comment,magic,0,arrow_color);
  GlobalVariableSet("globalBalans",AccountBalance());
  globPos();
//  if (GlobalVariableGet("globalPosic")>25)
//  {
  GlobalVariableSet("globalPosic",0);
  if (AutoLot) LotSize();
//  }
  if(ticket>0)
  {
    if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))
      {
        return(0);
      }
    else
      {
        Print("OpenShort(),OrderSelect() - returned an error : ",GetLastError());
        return(-1);
      }   
  }
  else
  {
    Print("Error opening Sell order : ",GetLastError());
    return(-1);
  }
}
int init()
{
  // control of a variable before using
  if (AutoLot) LotSize();
  if(!GlobalVariableCheck("globalBalans"))
    GlobalVariableSet("globalBalans",AccountBalance());
  if(!GlobalVariableCheck("globalPosic"))
    GlobalVariableSet("globalPosic",0);
  return(0);
}
int deinit()
{   
  return(0);
}
int start()
{
  if((TimeHour(TimeCurrent())>TradeTime)) cantrade=true;  
  // check if there are open orders ...
  total=OrdersTotal();
  if(totaldelta_S*Point)) //if it is
      {
        //condition is fulfilled, enter a short position:
        // check if there is free money for opening a short position
        if(AccountFreeMarginCheck(Symbol(),OP_SELL,lot)delta_L*Point)) //if the price increased by delta
      {
        // condition is fulfilled, enter a long position
        // check if there is free money
        if(AccountFreeMarginCheck(Symbol(),OP_BUY,lot)0)
   {
      for(cnt=0;cnt=0))
               {     
                  RefreshRates();
                  if (OrderType()==OP_BUY)
                     closeprice=Bid;
                  else  
                     closeprice=Ask;         
                  if (OrderClose(OrderTicket(),OrderLots(),closeprice,10,Green))
                  {
                  Print("Forced closing of the trade - ?,OrderTicket());
                     OrderPrint();
                  }
                  else
                     Print("OrderClose() in block of a trade validity time checking returned an error - ",GetLastError());        
                  }
               }
               else
                  Print("OrderSelect() in block of a trade validity time checking returned an error - ",GetLastError());
         }
      }     
      return(0);
   }
板凳
byrontang 发表于 2018-1-11 02:30:56 | 只看该作者
严重鄙视论坛上某些人,盗用别人上传过的东西重复上传。而且有的还把模版跟指标分开放,收取两次金币!
特别是一个头像是四眼仔站在什么软件大学前面的那个、这个人最恶心!傻bb的样子总是东拼西凑一些东西。
地板
kxzhong 发表于 2018-1-11 03:13:31 | 只看该作者
我的的那个软件原版好相不是你开发的吧,原版是德国人开发的,只不过大陆人,(最少也不是你,你没有这个能力)。改成的中文版而以。我有这个能力,你可以来东莞,我给保证给你10万人民币。
5#
逸兴壮思飞 发表于 2018-1-11 03:51:18 | 只看该作者
同感!支持楼主!
6#
lxz777 发表于 2018-1-11 04:57:34 | 只看该作者
支持一下。。。。。
7#
晴天一鹤 发表于 2018-1-11 05:15:46 | 只看该作者
谢谢分享
8#
wbshh 发表于 2018-1-11 06:01:29 | 只看该作者
OrdersTotal
9#
xtl2013 发表于 2018-1-11 07:39:47 | 只看该作者
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10#
wbshh 发表于 2018-1-11 09:15:03 | 只看该作者
回复为学习
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

发布主题
阅读排行更多+

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