Using BID Price of USDJPY in EURCAD symble Expert

 

Hello freinds, I write an Expert which is running in EURCAD chart, and it uses the bid price of USDJPY?

I wrote the folowing lines:

RefreshRates();

double B_UJ = MarketInfo("USDJPY",MODE_BID);

And It still compute the veriable B_UJ as 0.0, WHY?

Can somebody help me?

Thankes

 
crossy:

Hello freinds, I write an Expert which is running in EURCAD chart, and it uses the bid price of USDJPY?

I wrote the folowing lines:

RefreshRates();

double B_UJ = MarketInfo("USDJPY",MODE_BID);

And It still compute the veriable B_UJ as 0.0, WHY?

Can somebody help me?

Thankes

crossy,

Just check that and it's working fine on my mt4..

 

C

Your pairs may not be named exactly that, some micro accounts have a 'm' sufix, some others have '_fx' as the suffix

So look in Market Watch (button on MT tool bar) for any prefix or suffix and add this exactly in the call to MarketInfo

Good Luck

-BB-

 
robofx.org wrote >>

crossy,

Just check that and it's working fine on my mt4..

Hi freind, Thankes for your response, but I checked it again and it does not work correctly.

What I think is that as you do Refreshrates(), it does it to EURCAD only, not to USDJPY..

Do I wronge?

Thankes

 
BarrowBoy wrote >>

C

Your pairs may not be named exactly that, some micro accounts have a 'm' sufix, some others have '_fx' as the suffix

So look in Market Watch (button on MT tool bar) for any prefix or suffix and add this exactly in the call to MarketInfo

Good Luck

-BB-

Thankes C, But i'm not at micro or something else, I'm at USDJPY - clean.

 
robofx.org wrote >>

crossy,

Just check that and it's working fine on my mt4..

crossy
wrote
>>

Thankes C, But i'm not at micro or something else, I'm at USDJPY - clean.

Hello robofx.org, I have the answer but it is still a problem.

As I run the EA on LIVE chart (also with demo) you get it right, but as you

do BACKTEST it is still ZERO. Can anybody help?

 
crossy wrote >>

Hello robofx.org, I have the answer but it is still a problem.

As I run the EA on LIVE chart (also with demo) you get it right, but as you

do BACKTEST it is still ZERO. Can anybody help?

The tester is taking it as a multi-currency ea and they cannot be tested in the back tester. Hopefully muti-currency testing will be available in MT5

Keith

 
crossy:

Hello robofx.org, I have the answer but it is still a problem.

As I run the EA on LIVE chart (also with demo) you get it right, but as you

do BACKTEST it is still ZERO. Can anybody help?

You are quite right, crossy. Made a backtest and result is 0 as you said. Strange.. suppose problem is in backtester.

 

Maybe:


double B_UJ = MarketInfo("USDJPYm",MODE_BID);

 
crossy:

Hello freinds, I write an Expert which is running in EURCAD chart, and it uses the bid price of USDJPY?

I wrote the folowing lines:

RefreshRates();

double B_UJ = MarketInfo("USDJPY",MODE_BID);

And It still compute the veriable B_UJ as 0.0, WHY?

Make sure USDJPY is presented in Market Watch list. 


BTW RefreshRates() has nothing to do with MarketInfo().

 
crossy wrote >>

Hello robofx.org, I have the answer but it is still a problem.

As I run the EA on LIVE chart (also with demo) you get it right, but as you

do BACKTEST it is still ZERO. Can anybody help?

Hello

If i get it right you need to be connected because even though its working with historical data, the backtest needs access to updated marketinfo data

I have same problem using mini lots

The orders are rejected when not connected. When it works using normal lots and not being connected

Reason: