Marketinfo error in IBFX Live server

 

Hi,

I have an EA that uses Marketinfo function to get ask, bid, point and digits. I use it in 2 IBFX demo accounts, without any issue, since 07-04-2013. I tried today to use it in my live (mini) account and the EA does not work, because the Marketinfo function gets "0" for all values. I tryed to use Live support about this but the person did not know half of what I know about MT4 and MQL4, and believe me, I do not know much :-)

My live server is IBFX-MT4-03.

Has anyone had this problem? Is there any way of solving this? If I cannot solve it, I will need to move my mini account to other broker, and I use IBFX for a long time.

Joaquim Fonseca

 

No mind readers here. Where is YOUR code?

Probably because your code is BROKEN. symbol = "eurusdM" vs "EURUSD"

 
WHRoeder:

No mind readers here. Where is YOUR code?

Probably because your code is BROKEN. symbol = "eurusdM" vs "EURUSD"

 This is my code:

int w;
for (w=8-1;w>=0;w--)
  {
  string S;
  if (w ==0) S = "AUDUSD";
  if (w ==1) S = "EURUSD";
  if (w ==2) S = "USDCAD";
  if (w ==3) S = "USDJPY";
  if (w ==4) S = "USDCHF";
  if (w ==5) S = "GBPUSD";
  if (w ==6) S = "NZDUSD";
  if (w ==7) S = "GBPJPY";
  //S = "GBPJPY";

  double bid   =MarketInfo(S,MODE_BID);
  double ask   =MarketInfo(S,MODE_ASK);
  double point =MarketInfo(S,MODE_POINT);
  int    digits=MarketInfo(S,MODE_DIGITS);
  if (ask == 0)
    {
    if (w ==0) S = "mAUDUSD";
    if (w ==1) S = "mEURUSD";
    if (w ==2) S = "mUSDCAD";
    if (w ==3) S = "mUSDJPY";
    if (w ==4) S = "mUSDCHF";
    if (w ==5) S = "mGBPUSD";
    if (w ==6) S = "mNZDUSD";
    if (w ==7) S = "mGBPJPY";
   
    //S = "mGBPJPY";
   
    bid   =MarketInfo(S,MODE_BID);
    ask   =MarketInfo(S,MODE_ASK);
    point =MarketInfo(S,MODE_POINT);
    digits=MarketInfo(S,MODE_DIGITS);
    }

 

It works on DEMO but it does not work on LIVE account :-( 

 
JFonseca:

...

It works on DEMO but it does not work on LIVE account :-( 

  • Please use SRC button when posting code.
  • What is the symbol of the chart your code is attached ?
 
angevoyageur:
  • Please use SRC button when posting code.
  • What is the symbol of the chart your code is attached ?


 

 It's attached to a mEurUsd chart, but it does not matter because this EA trades 8 pairs disregarding the chart that it is attached to. That's the reason why I need to use Marketinfo function.

 

I did not know the existence of the SRC button, sorry. Next time I'll use it.

 

Joaquim 

 
WHRoeder:

No mind readers here. Where is YOUR code?

Probably because your code is BROKEN. symbol = "eurusdM" vs "EURUSD"

You were SPOT ON! THANKS!

 

In DEMO Symbol is mEURUSD, in LIVE is EURUSDm :-)