{已解决}怎样让EA在K线距离收盘7秒内开始交易?
2011-11-12 21:13 上传
MACD Sample.mq4 (5.59 KB, 下载次数: 2) 2011-8-19 20:38 上传
点击文件名下载附件
下载积分: 金币 -2
//这个是附件可是运行后不会下单
// Remaining_Time
if (Remaining_Time){
double Remaining_Time_Height;
Remaining_Time_Height = 55;
double g;
int m, s, k, h;
m = Time[0] + Period()*60 - TimeCurrent();
g = m/60.0;
s = m%60;
m = (m - m%60) / 60;
string text;
if (Period() = 60) h = m/60;
else h = 0;
k = m - (h*60);
text = h + h + k + m + s + s
}
ObjectCreate( Remaning_Time , OBJ_LABEL, 0, 0, 0);
ObjectSetText( Remaning_Time , text, 15, Arisaka , Remaining_Time_Color);
ObjectSet( Remaning_Time , OBJPROP_CORNER, 0);
ObjectSet( Remaning_Time , OBJPROP_XDISTANCE, 10);
ObjectSet( Remaning_Time , OBJPROP_YDISTANCE, 80);
}
m = Time[0] + Period()*60 - TimeCurrent();// 取时间
g = m/60.0;//
s = m%60; // 秒
这些都在摘自上面粉红代码里面的
if(MacdCurrentSignalCurrent MacdPrevious(MACDOpenLevel*Point) MaCurrent MaPrevious s (Period()*60)-7
){开始交易();} //绿色部分由柒侠 提供
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!