Errors, bugs, questions - page 1752

 
A100:

You should end up with something like this

void OnStart()
{
        A<int> a;
        int b  = a[ 0 ];
        a[ 0 ] = a[ 1 ];
        a[ 1 ] = b;
}
It's an interesting problem. I've thought about it for a while and haven't figured it out yet.
 
fxsaber:
Before publishing the code to kodobase, do the authors put the source code into 1-3 files on purpose, or do most of the submitted authors write "everything in a pile" that way?
It seems that they do it on purpose. This makes it easier to get acquainted with the work, as few people know some of the features of the terminal.
 

Those who are able to write an EA or an indicator won't browse the codebase looking for something. Therefore, if they are looking for some code in the codebase, no libraries, much less classes, will be clear to them and they will pass by this code.

+ When you are programming for example to order - then to give the user the source code with a trolley of files to include - he will curse you.

It is easier to keep all in one file - get the job done - give source code - go.

The code is not a problem, but you can do libraries and so on for your own programs.

 
Vladislav Andruschenko:

Those who can write an EA or indicator won't go poking around the codebase looking for something.

I searched (through google) in kodobase, in search of source code, which uses something I need. To understand how it works from working code. And I searched for my prototypes to convert MT4->MT5.

Therefore, if they are looking for some code in the codebase they will not understand any libraries, much less classes and will pass by this code.

So why do they need to do it through the site when they may run any work in the terminal itself?

+ When you are programming, for example, to give the user the source code with a trolley of files to include - he will curse you.

It is easier to keep all in one file - get the job done - give source code - go.

You can make libraries for your own programs and so on.

And in the archive? For such cases, perhaps, it would be good to have an automatic collection of source from many files into one directly in the meta-editor.
 
fxsaber:
And in an archive? For such cases, it's probably a good idea to have an automatic collection of source from multiple files into one directly in the meta-editor.
This is a very good idea. So that all the files you need for the program is pulled into an archive and placed in the right folders. The customer may unpack them into MQL4/5 folder and not bother.
 
Alexey Kozitsyn:
But this idea is very good. So that all the files you need for the program are removed into the archive and stored in the required folders. The customer may unpack them into MQL4/5 folder and not bother.

And then, something needs to be changed in some library - and oops ... . ... the customer has to reassemble the entire archive again,

Then the customer changes something - decides to move the code to another computer and .... trouble.

 
But it's not so clear-cut

Forum on trading, automated trading systems and testing trading strategies

Indicators: ClockAnalog

fxsaber, 2016.11.01 19:08

Seems like when the work is in demand, the number of files is not a barrier to downloading.

Libraries of your own? Richer uses for them where to see them?

Now in second place in the kodobase in terms of number of files is 16. The first is ALGLIB.

ALGLIB - библиотека численного анализа
ALGLIB - библиотека численного анализа
  • votes: 61
  • 2012.10.12
  • //www.mql5.com/ru/users/MetaQuotes">
  • www.mql5.com
Библиотека математических функций ALGLIB version 3.5.0, портированная на MQL5.
 
Vladislav Andruschenko:

And then, something needs to be changed in some library - and oops ... . ... the customer has to reassemble the entire archive again,

Then the customer changes something - decides to move the code to another computer and .... trouble.

Um... I don't see any problem here. You need to change something - you changed it. Next, according to the situation. If the changes are in one file, I send them to the client and tell him where to put them. If the changes are in several files, I rebuild the archive and send it to the customer, telling him to replace all the files if they are the same.

And if the client did something to himself... No one is immune from this nowadays either.

 
fxsaber:
Interesting challenge. Thought about it a bit and haven't figured out the solution yet.
I tried to cobble together three solutions(one, two, three). It didn't work.

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

A100, 2016.11.01 07:46

It should end up something like this

void OnStart()
{
        A<int> a;
        int b  = a[ 0 ];
        a[ 0 ] = a[ 1 ];
        a[ 1 ] = b;
}
Somewhere we need to work with const-overloading operators, chaining int-uint variants. But I haven't managed to figure it out.
 

Is it possible to determine, by means of MQL, that a user has a product purchase?

For example: The Expert Advisor was purchased and the developer needs to make an urgent update, the author puts the EA that checks if the program was purchased by the user and only then works.

That would be interesting.

Reason: