A question for MQL experts - page 9

 

Good afternoon. Help me find an error in the code.

This is the initial program in the tutorial .

It doesn't count ticks. Why is it like this?

Thank you

//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int Count=0; // Global variable.
//--------------------------------------------------------------------
int init() // Special init()
{
Alert ("The init() function worked at start"); // Message
return; // Exit init()
}
//--------------------------------------------------------------------
int start() // Special init()
{
double Price = Ask; // Local variable Count.
Count++; // Tick counter
Alert("New tick ",Count," Price = ",Price);// Message
return; // Exit start()
}
//--------------------------------------------------------------------
int deinit() // Special function deinit()
{
Alert ("Deinit() triggered during upload"); // Message
return; // Exit deinit()
}
//--------------------------------------------------------------------

 

Here's what's coming out

 

Good morning.

The server at the brokerage company where I have a real account is set up in such a way that if no quotes are received for more than 3 minutes (different time for different symbols) then a trade ban is generated and instead of executing an order to open/close or upgrade, the server responds with NO PRICE (until a quote is received). At the same time, a message is displayed in the log:

2012.04.20 13:42:07 '245---00': order buy 0.2 JOK2 opening at 0.00 sl: 0.00 tp: 0.00 failed [Off quotes]

-------------------

So it turns out that working with multicurrency EA of this brokerage company in MT4 is impossible. Especially during low-liquidity night time - one/two positions are still open - and another 2-3 are getting rejected!

I do not understand why they have done that. Support does not really answer, they twist like worms under the boot, and fobbed off to the mql developers - often stating that this is (literally:) a glitchy feature of the mt4 platform. All right, leave it to their conscience.

Please, advise me how to return to the terminal this strange ban " opening at 0.00 sl: 0.00 tp: 0.00 failed [Off quotes]" - so I could check all 3-4 currencies I need for "NO PRICE" in programmatically before opening and only then the EA would send orders to open/close positions! Their Tech-Support does not give an answer to this question ...

 
Rita:

I do not understand why it is done that way.

This is a crutch. It's usually a crutch for DCs who have problems with quote delays.

If you want to monitor it yourself, you need to monitor all ticks for all traded symbols and introduce a ban to the Expert Advisor in advance.

 
greysoldier:

Good afternoon. Help me find an error in the code.

This is the initial program in the tutorial .

It doesn't count ticks. Why is it like this?

Thank you

//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int Count=0; // Global variable.
//--------------------------------------------------------------------
int init() //special init() function
{

}
//--------------------------------------------------------------------
int start() // special function start()
{
double Price = Ask; // Local variable.

Count++; // Tick counter

Alert("New tick ",Count," Price = ",Price);// Message
return; // Exit start()
}
//--------------------------------------------------------------------
int deinit() // Special function deinit()
{

}
//--------------------------------------------------------------------

so
 
TheXpert:

This is a crutch. Usually such a thing is introduced in brokerage companies that have problems with quote delays.

If we want to monitor it ourselves, we should monitor all ticks for all traded symbols and introduce the ban to the Expert Advisor in advance.


So it turns out that we cannot programmatically set the correct operation of multicurrency EA - for simultaneous opening/closing positions of several currencies?

Especially since there is a different interval for different currencies (and there are hundreds of instruments in MT4!) - in the server there is a different interval before the prohibition "NO PRICE" and these intervals change during the day!

What do the developers of the mt4 platform have to say? How can a multi-currency EA work normally in such conditions with frequent [Off quotes], especially at night ( see my post above)?

 
Rita:

Especially, for different currencies (and there are several hundreds of instruments in MT4!) - the server sets different intervals to the moment of "NO PRICE" prohibition

That's true.

and these intervals change during a day!

That's unlikely. They seem to be hardwired into the tool.

 

I have asked questions from newbies and no reply, maybe someone here can help.

Hello, help advice, wrote an owl, it periodically has to open 2 orders at once the problem is that not always opens both orders, slippage I put and 3 and 5 and 10, but still no no yes and open a single. I can not figure out how to organize a keeper that would keep track of openings and, if necessary, open a missing "forgotten" order?

 
Show me the part of the code where you set the conditions for opening these two orders at the same time...
 
Open one order, check for opening, if it opens, open a second order with a check...
Reason: