Errors, bugs, questions - page 1228

 
Rosh:

The GetData() method is defined in the base parent class and does not need to be overridden in this case.

Note that before calling GetData() you need to refresh values in indicator buffers of the class using Refresh() method


Here are some examples that compile and work.

I was speaking about MQL4. Nothing it does not compile there because of those bugs that I have pointed out. As I understood from the answer in Service Desk, no one wants to deal with 4.

 

3 14:55:11.739 Cannot open file 'D:\progy\mt4\MQL4\indicators\.ex4' [123] 

It appeared when the loop was running very fast:

1. switch to the next chart in order
2. open list of indicators
3. check all indicator names
4. start of a new indicator(custom indicator "ХХХ_Сombo")

I inserted small delays into the code - it seems to have gone better (probably asynchronous operations did not keep up with each other somewhere)

 

Terminal 1010, roboforex, error 4901,

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- open the DOM and subscribe for notifications 
   if(!MarketBookAdd(_Symbol)){Alert("Error ",GetLastError());return -1;}
//---
   return 0;
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//--- close the DOM
   if(!MarketBookRelease(_Symbol))
      Print("Failed to close the DOM!");
  }
//+------------------------------------------------------------------+
//| BookEvent function                                               |
//+------------------------------------------------------------------+
void OnBookEvent(const string &symbol)
  {
   Print("Book event for: "+symbol);
//--- select the symbol
   MqlBookInfo priceArray[];
   bool getBook=MarketBookGet(NULL,priceArray);
   if(getBook)
     {
      int size=ArraySize(priceArray);
      Print("MarketBookInfo по ",Symbol());
      for(int i=0;i<size;i++)
        {
         Print(i,":",priceArray[i].price
               ,"    Volume= ",priceArray[i].volume,
               " type = ",priceArray[i].type);
        }
     }
   else
     {
      Print("Не удалось получить содержимое стакана по символу ",Symbol());
     }

  }
//+------------------------------------------------------------------+
Something's not working!
 
JJerboa:

Terminal 1010, roboforex, error 4901,

It's not working!

Is there a stack on the requested symbol?

What does the query return?

SymbolInfoInteger(_Symbol,SYMBOL_TICKS_BOOKDEPTH)

?

There is no stack for EURUSD.

 
alexvd:

Is there a glass by the requested character?

What does the query return?

SymbolInfoInteger(_Symbol,SYMBOL_TICKS_BOOKDEPTH)

?

There is no price window for EURUSD.

it returns 0

does it open the window of the market...

Or is the market depth function not working in forex now ?

 
JJerboa:

returns 0

does the market glass window open...

or is the forex price cup function not working now?

It's not a stock betting window.

 

If an Expert Advisor needs to use graphical objects for operation: trend lines, horizontal lines, etc.

Will such an EA work correctly on the virtual hosting built into the terminal?

Example: An Expert Advisor opens orders on touching a trend line.

 
 
Looks like the 989 build has been broken. The experts in the 989 build produce completely different results
on the same story and with the same parameters than in build 975.
Take any EA, at least from my examples...
So it's a tale, on the fly agent updates and here the profitable Expert Advisor starts grinding losses on the real one.
 
crOss:
It seems to have broken build 989. The experts in the 989 build give completely different results
on the same story and with the same parameters than in build 975.
Take any EA, at least from my examples...
That's how trivial it is, update on the fly agent and a profitable Expert Advisor starts making losses on the real account.

Now the official build is 1010 and 989 was a beta.

Please update and try again.