自己写的EA模版分享 解决重复下单,开单不能下止损单等问题
(2013-01-27 10:42:41)
标签:
财经 |
分类: mt4程序化交易 |
//+------------------------------------------------------------------+
//|
test14_EA.mq4 |
//|
wangyu |
//|
http://wangyu204.taobao.com |
//+------------------------------------------------------------------+
//EA 模版功能
//1.同一标识不会重复下单
//2.止损止盈可以设置为0
//3.兼容有些平台 开单不能下止损的问题
//
#property copyright "wangyu"
#property link
"http://wangyu204.taobao.com"
//定义全局变量
double ema10_15M;
double ema20_15M;
double ema10_30M;
double ema20_30M;
double k;
double d;
double prevK;
double prevD;
//+------------------------------------------------------------------+
//| expert initialization function
|
//+------------------------------------------------------------------+
int init()
//+------------------------------------------------------------------+
//| expert deinitialization function
|
//+------------------------------------------------------------------+
int deinit()
//+------------------------------------------------------------------+
//| expert start function
|
//+------------------------------------------------------------------+
int start()
//+------------------------------------------------------------------+
//get data
void getData()
{
}
// open sell contidion
bool needOpenSell()
{
bool needOpenSell()
{
}
bool needOpenBuy()
{
}
int buy(double lots,int stopLoss,int stopProfit,string
comment,int magic)
{
}
int sell(double lots,int stopLoss,int stopProfit,string
comment,int magic) //magic 暂时没有用到
{
}
前一篇:计算机日常问题 解决汇总