最近破源了一个ea,被我的俄国老朋友Nixxer破过限,原本来自葡萄牙作者这里,名字叫“forex automation ea”,被国内网友改了名叫“暴利黄金V1”,但官方网站没显示用于黄金呀?但指出可用于数字货币品种。
EA策略核心是小间距小止盈无止损网格马丁,网格间距默认参数100小点,开单方向使用均线判断。
手数默认1.457倍膨胀。
带有必要的净值管理(Equity Guardian)功能,但问题也出在这里,分析其源码发现,该EA不能与其它EA混跑,多处会产生逻辑冲突,比如统计净值也统计别的ea的订单,选择当前在手最后一个订单操作(如果操作了别人的订单,就无语了)...这也是很多ea需要破源的原因。有这方面需求的朋友,可继续联系我们,破限破源费用低廉。
其它还存在的问题有,平仓时,每个订单后放了一句Sleep(1000),消息1秒,市场价格也会发生变化,平仓之前的逻辑就有可能发生变化呐。
该EA编程方面的几点值得记录的有:
- TerminalInfoInteger(8)检查是否允许自动交易
- 读取第三方网站,判断是否有news(新闻)发生,该段代码值得参考。
int 序号 = 0;
void GetNewsURL()
{
string 甲串;
int pos1;
int pos2;
int pos3;
char charA[];
char charB[];
//----- -----
string 无用串= "";;
string 临时串= "";;
int 句柄;
int 下级句柄;
ResetLastError();
if ( WebRequest("GET","https://ec.forexprostools.com/?columns=exc_currency,exc_importance&importance=1,2,3&calType=week&timeZone=15&lang=1",NULL,NULL,5000,charA,0,charB,无用串) == -1 )
{
Print("WebRequest error, err.code =",GetLastError());
MessageBox("You must add the address \' https://ec.forexprostools.com/?columns=exc_currency,exc_importance&importance=1,2,3&calType=week&timeZone=15&lang=1\' in the list of allowed URL tab \'Advisors\' "," Error ",64);
}
else
{
PrintFormat("File successfully downloaded, the file size in bytes =%d.",ArraySize(charB));
句柄 = FileOpen("news-log.html",6);
if ( 句柄 != -1 )
{
FileWriteArray(句柄,charB,0,ArraySize(charB));
FileClose(句柄);
下级句柄 = FileOpen("news-log.html",5);
临时串 = FileReadString(下级句柄,ArraySize(charB));
FileClose(下级句柄);
}
else
{
Print("Error in FileOpen. Error code =",GetLastError());
}
}
甲串 = 临时串 ;
pos1=StringFind(甲串,"pageStartAt>",0) + 12;
pos2 = StringFind(甲串,"</tbody>",0) ;
甲串 = StringSubstr(甲串,pos1,pos2 - pos1) ;
pos1 = 0 ;
if(IsStopped()) return;
do
{
pos1=StringFind(甲串,"event_timestamp",pos1) + 17;
pos2=StringFind(甲串,"onclick",pos1) - 2;
if ( pos1 < 17 || pos2 < 0 ) return;
ARRAY[0][序号] = StringSubstr(甲串,pos1,pos2 - pos1);
pos1=StringFind(甲串,"flagCur",pos1) + 10;
pos2=pos1 + 3;
if ( pos1 < 10 || pos2 < 3 ) return;
ARRAY[1][序号] = StringSubstr(甲串,pos1,pos2 - pos1);
if ( StringFind(ss,ARRAY[1][序号],0) < 0 ) continue;
pos1=StringFind(甲串,"title",pos1) + 7;
pos2=StringFind(甲串,"Volatility",pos1) - 1;
if ( pos1 < 7 || pos2 < 0 ) return;
ARRAY[2][序号] = StringSubstr(甲串,pos1,pos2 - pos1);
if ( ( StringFind(ARRAY[2][序号],"High",0) >= 0 && !(NewsHard) ) ) continue;
if ( ( StringFind(ARRAY[2][序号],"Moderate",0) >= 0 && !(NewsMedium) ) ) continue;
if ( ( StringFind(ARRAY[2][序号],"Low",0) >= 0 && !(NewsLight) ) ) continue;
pos1=StringFind(甲串,"left event",pos1) + 12;
pos3 = StringFind(甲串,"Speaks",pos1) ;
pos2 = StringFind(甲串,"<",pos1) ;
if ( pos1 < 12 || pos2 < 0 ) return;
if ( ( pos3 < 0 || pos3 > pos2 ) )
{
ARRAY[3][序号] = StringSubstr(甲串,pos1,pos2 - pos1);
}
else
{
ARRAY[3][序号] = StringSubstr(甲串,pos1,pos3 - pos1);
}
序号 ++;
if ( 序号 == 300 ) return;
}
while(!(IsStopped()));
}
该EA也自己统计动态浮亏,大约是盈利能力的2倍,适合大资金美分账号使用,整体不推荐。对此源码有兴趣的,欢迎互换,用于分析学习。
发表评论