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

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

本人理念,菜鸟EA,高手指点

  [复制链接]
616 15
jxqsl 发表于 2018-1-11 00:41:21 | 只看该作者 |阅读模式 打印 上一主题 下一主题
理念:赔小钱挣大钱
方法:3日线上穿26日线买入,26日线上穿3日线平仓;26日线上穿3日线买入,3日线上穿26日线平仓
如图:
#property copyright "Copyright 2013, MetaQuotes
Software Corp."
int ticket;
double cw=0.1;
int m=0,n=0;
double Ma3, Ma26;
//+---------------------------------------------
---------------------+
//| expert initialization function |
//+---------------------------------------------
---------------------+
int init()
{
//----
//----
return(0);
}
//+---------------------------------------------
---------------------+
//| expert deinitialization function |
//+---------------------------------------------
---------------------+
int deinit()
{
//----
//----
return(0);
}
//+---------------------------------------------
---------------------+
//| expert start function |
//+---------------------------------------------
---------------------+
int start()
{
int i=0;
int j=0;
//----
Ma3=iMA(NULL,0,3,0,MODE_SMA,PRICE_CLOSE,0);
Ma26=iMA(NULL,0,26,0,MODE_SMA,PRICE_CLOSE,0);
if(Ma3>Ma26)
{
i=i+1;
}
else
i=0;
if(Ma3i)
{
pc();
OrderSend(Symbol(),OP_SELL,cw,Bid,3,0*Point,0,"lbs-buy",197658,0,Green);
m=0;
Sleep(100000);
}
if(n>j)
{
pc();
OrderSend(Symbol(),OP_BUY,cw,Ask,3,0*Point,0,"lbs-buy",197658,0,Red);
n=0;
Sleep(100000);
}
//+---------------------------------------------
---------------------+
m=i+0;
n=j+0;
//----
return(m);
return(n);
}
//+---------------------------------------------
---------------------+
void pc()
{
while(OrdersTotal()!=0)
{
int total=OrdersTotal();
for(int i=0;i<total;i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==true)
{
if(OrderType()==OP_BUY)
{
OrderClose(OrderTicket(),OrderLots
(),Bid,30,Blue);
}
if(OrderType()==OP_SELL)
{
OrderClose(OrderTicket(),OrderLots
(),Ask,30,Blue);
}
if((OrderType()==OP_BUYLIMIT)||(OrderType()==OP_BUYSTOP)||(OrderType()==OP_SELLLIMIT)||(OrderType()==OP_SELLSTOP))
{
OrderDelete(OrderTicket());
}
}
}
}
}
结果:在同一根K线上多次买卖。加了Sleep(100000)也不管
问题:同一根K线上交易一次
收藏
收藏0
转播
转播
分享
分享
分享
淘帖0

精彩评论15

跳转到指定楼层
16#
moopxy 发表于 2018-1-11 13:18:57 | 只看该作者
看看看看看看看看看看看看
15#
aleyuan 发表于 2018-1-11 12:09:00 | 只看该作者
哈哈哈哈哈哈哈,谢谢
14#
花开在眼前 发表于 2018-1-11 11:01:29 | 只看该作者
谢谢分享,继续关注您的进展
13#
宗瓠 发表于 2018-1-11 10:37:21 | 只看该作者
如果把指标放到K线结束可能会好点吧
12#
jiaxuan 发表于 2018-1-11 10:02:04 | 只看该作者
谢谢分享
11#
cfdylz 发表于 2018-1-11 09:28:13 | 只看该作者
看看看看
10#
吾要成财 发表于 2018-1-11 09:12:58 | 只看该作者
看看看看看看看看看看看看看看
9#
zhao543 发表于 2018-1-11 08:37:09 | 只看该作者
单一指标的准确率并不是很高
8#
haoofz 发表于 2018-1-11 06:59:25 | 只看该作者
谢谢分享,继续关注您的进展
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

发布主题
阅读排行更多+

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