下载MetaTrader 5

Rosh 如何在一个ea里面比较几个不同的货币对分别与各自的30均线的比较结果?

要添加评论,请登录注册
liuxiaodong
282
liuxiaodong  

easyeu11=iMA("UERUSD",PERIOD_M30,30,8,MODE_SMMA,PRICE_TYPICAL,0);
//
easygu11=iMA("GBPUSD",PERIOD_M30,30,8,MODE_SMMA,PRICE_TYPICAL,0);
//
easyuc11=iMA("USDCHF",PERIOD_M30,30,8,MODE_SMMA,PRICE_TYPICAL,0);
//
easyuj11=iMA("USDJPY",PERIOD_M30,30,8,MODE_SMMA,PRICE_TYPICAL,0);

希望实现判断四个货币对的k线同时在30均线的上方或者下方

如何实现这种判断 ?

请教!

Rashid Umarov
管理员
12162
Rashid Umarov  
Excuse me, I tried to translate your question by google (http://translate.google.ru/translate?u=http%3A%2F%2Fforum.mql4.com%2Fcn%2F14899&sl=zh-CN&tl=en&hl=ru&ie=UTF-8) but I did not understand machine translation.
liuxiaodong
282
liuxiaodong  
Rosh >>
Excuse me, I tried to translate your question by google (http://translate.google.ru/translate?u=http%3A%2F%2Fforum.mql4.com%2Fcn%2F14899&sl=zh-CN&tl=en&hl=ru&ie=UTF-8) but I did not understand machine translation.

hi Rosh

my meaning is how to compare a system Symbol value of ma30 to their currently k value in one ea ?

thkz

Greatshore
88
Greatshore  
if ((iLow("ERUSD", PERIOD_M30, 0) > easyeu11) &&
   (iLow("GBPUSD", PERIOD_M30, 0) > easygu11) &&
   (iLow("USDCHF", PERIOD_M30, 0) > easyuc11) &&
   (iLow("USDJPY", PERIOD_M30, 0) > easyuj11))
........
liuxiaodong
282
liuxiaodong  

谢谢 Rosh & GreatShore 我是这样解决的

Gdouble Bideu =MarketInfo("EURUSD",MODE_BID);
double Askeu =MarketInfo("EURUSD",MODE_ASK);
//
double Bidgu =MarketInfo("GBPUSD",MODE_BID);
double Askgu =MarketInfo("GBPUSD",MODE_ASK);
//
double Biduc =MarketInfo("USDCHF",MODE_BID);
double Askuc =MarketInfo("USDCHF",MODE_ASK);
//
double Biduj =MarketInfo("USDJPY",MODE_BID);
double Askuj =MarketInfo("USDJPY",MODE_ASK);

.......

if (Bideu > easyeu11 && .. && )

..................

要添加评论,请登录注册