Errors, bugs, questions - page 1231

 

P./S.: I managed to download a product from the Market in MT5 without authorization of my account in MQL5 (I have not tried it in MT4 without authorization).

I did not know about this possibility before.

 
meat:

And frankly, your arguments are strange. Those who don't know how to use it, don't use it. Have you seen many bullshit codes where FileFlush is used? I haven't seen any.

Almost everyone has used it incorrectly, and then they have "Metatrader lags". This WinAPI function is extremely slow.

When we went to 600 builds, we completely rewrote the entire file operation and accelerated it dozens of times on the usual small-bite modes of operation.


Andre-opening the file makes the code more difficult.

But it immediately makes you think about the consequences, do not put FileFlush on every tick and then do not be surprised with the results in the tester of trading strategies.

 
Renat:

Almost everyone has used it wrong, and then they have "Metatrader brakes".

You're exaggerating. Maybe there were some bad coders, but do not generalize. From your words it turns out as if everyone here are numbskulls and idiots.

But it immediately makes you think about the consequences...

Renat, you can't be serious, for God's sake! You make an impression that you are giving homework to students, like may they suffer, but will learn to think, etc. ("Hard in the study - easy in battle"). Do you position MQL as a training manual for dummies or as a working tool for programmers? If the second, then why do you put artificial sticks in the wheel?

If someone does not know or is not able to do something - this is his personal problem, let him learn. Why should they reduce the functionality for everyone else?

 
meat:

You're exaggerating. Maybe there were some bad coders, but you should not generalize. From your words it turns out as if all here noubs and idiots.

Renat, you can't be serious, for God's sake! It seems that you are giving homework to students, like may they suffer, but will learn to think, etc. ("hard in the learning - easy in battle"). Do you position MQL as a training manual for dummies or as a working tool for programmers? If the second, then why do you put artificial sticks in the wheels?

If someone does not know or is not able to do something - this is their personal problem, let him learn. Why should they have to cut functionality for everyone else?

Look around our forums and kodobase, please.

We're not in a school. We are in a much worse place where you have a lot of bad code and where MetaQuotes is always blamed a priori. If you do it that way, it's your fault, and if you do it the other way around, it's still your fault.

The decision to defeat FileFlush just came from understanding that disabling it is the lesser evil than watching traders slow down and complain. We didn't just disable it, we completely rewrote the entire file operation so that it is now an extremely efficient and speedy engine that mitigates any bugs and inefficient developer practices. We thought very hard.


For information, I'm not exaggerating, as I've been personally leading public discussions in our forums for over 13 years:


 
crOss:
Take any Expert Advisor (from MetaQuotes examples), run it under build 975 on a certain period and with the same parameters,
Obtain the results, i.e. yield curve chart and table of deals.


Now run the same Expert Advisor under 1010 build on the same period and with the same parameters, you'll get completely different results...

P.S. Metatester is 32 bit.

What does deal analysis show in the 975 build and 1010 build tester?

Find the divergence point to begin with. Compare the value of the swaps. Look at the volumes of the trades

 
Since I haven't heard anything from Service Desk for a week, I will raise the problem here(MT4 745 build):
1. I have an indicator with this code:
#property strict
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
{
   EventSetTimer(10);
   return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start ()
{
   return 0;
}
//+------------------------------------------------------------------+

void OnTimer()
{
   ChartSetSymbolPeriod(0, _Symbol, 1);
}
2. I have an Expert Advisor with this code:
#include <ChartObjects\ChartObjectsTxtControls.mqh>     


CChartObjectButton *p_button1 = NULL;                              
int OnInit()
{
   p_button1 = new CChartObjectButton; 
   p_button1.Create(0, "ddd", 0, 10, 20, 30, 40); // create button
 
   return INIT_SUCCEEDED;
}

void OnDeinit(const int reason)
{
   if (p_button1 != NULL)
   {
      p_button1.Delete();
      delete p_button1;
   }
}
void OnTick(void)
{
}

3. Attach indicator first , Expert Advisor second
4. We steal the chart and wait for it to hang when usingChartSetSymbolPeriod
5. Everything works with manual TF switching andwith manual switching of currency pairs. But it doesn't work with software (either stack on curve release or some leakage ....)


I managed to solve the problem with TF switching - API as once again turns out to be more reliable
But how to switch a currency pair with API?

 
ALXIMIKS:
Since there is no feedback from Service Desk for a week I raise the problem here(MT4 745 build):
1. There is an indicator with this code:
2. There is an Expert Advisor with this code:

3. Attach indicator first , expert second
4. We steal the chart and wait for it to hang when usingChartSetSymbolPeriod
5. Everything works with manual switching of TF andwith manual switching of currency pairs. But it doesn't work with software (either stack on curve release or some leakage ....)


I managed to solve the problem with TF switching - API as once again turns out to be more reliable
But how to switch the currency pair to the required one with API?

Your application is not lost.

We will definitely answer you.

 
Can someone clarify: I've had my rank (profile) dropping for the last few days. Is this a new feature, just something tweaked in the site algorithm, or something else?
 
Renat:

Look around our forums and kodobaza, please.

We are not in a school. We are in a much worse place, where there is a lot of bad code and where MetaQuotes is always a priori to blame for everything. If you do it that way, it's your fault; if you do it the other way around, it's still your fault.

Have you ever thought that perhaps you yourself are responsible for spreading this story? So, it turns out that you blame yourself a priori.Some newbies turn to you with a complaint that something doesn't work there, and instead of politely explaining to them or sending them to study the facts, you buckle under their feet and remake your product to satisfy their ignorance. That's how it works, isn't it? In the end, the quality of the product suffers, and these people learn nothing.

I understand if we were talking about a trading platform. But we are talking about a programming language where flexibility is important. And you take away this flexibility. You are a programmer yourself and probably understand that there are no universal solutions. Your supposedly effective mechanism is suitable only for some particular cases and is absolutely useless in other cases.One needs to dump data to disk every 10 seconds, the other - every 10 MB, the third - at every tick (yes, yes, there is such a need, if information is very important). And again, if a person uses something incorrectly - it is his personal problem, no need to indulge his ignorance and bend to it.

I didn't start all this for nothing. I had a code where FileFlush was periodically dumping info to disk. And lately I noticed that nothing is dumped, although the amount of data accumulates to 30-40 Mb. As a result, when the terminal crashes (and this is not an uncommon occurrence) everything is lost. And you have not even bothered to warn about it. It thoroughly undermines trust in MQL, if any function can stop working at any time.

 
meat:

Have you thought about the fact that you may be the one contributing to the spread of this story? So it turns out that you a priori consider yourself to be at fault.Some newbies turn to you with a complaint that something doesn't work there, and instead of politely explaining to them or sending them to study the facts, you buckle under their feet and remake your product to satisfy their ignorance. That's how it works, isn't it? In the end, the quality of the product suffers, and these people learn nothing.

We think constantly and deeply enough. As a result, we make such decisions so that everyone would have fewer mistakes.


I understand if we were talking about a trading platform. But we are talking about a programming language where flexibility is important. And you take away this flexibility. You are a programmer yourself and probably understand that there are no universal solutions. Your supposedly effective mechanism is suitable only for some particular cases and is absolutely useless in other cases.One needs to dump data to disk every 10 seconds, the other - every 10 MB, the third - at every tick (yes, yes, there is such a need, if information is very important). And again, if a person uses something incorrectly - it's his personal problem, no need to indulge his ignorance and bend to it.

Let you respond for us so "these are your personal problems" on our forums. Let's see how many hours you endure before they tell you how to do business and why you are wrong.


I didn't start all this for nothing. I had a code, where FileFlush was periodically dumping information to disk. And lately I've noticed that nothing is dumped, although the amount of data collected is 30-40 Mb. As the result, when terminal crashes (and this is not a rare event) everything is lost. And you haven't even bothered to at least warn us about it. It thoroughly undermines trust in MQL, if any function can stop working any time.

I pointed out above that our priority is to work efficiently and maximise the performance of our platform alone, not to work on the side. This primarily applies to all file operations: logs, databases and expert files.

If you are so keen to work externally with open(and that in itself is already a serious problem) files, then take action.

No need to hit the wall - this decision is conscious and will not be changed.

Reason: