Download MetaTrader 5
To add comments, please log in or register
Share your programs. That will improve your rating.
graziani
1894
graziani 2016.06.28 11:14 

Before b600 (b540 actually or whatever) standard way of writing indicators was to use start() function and IndicatorCounted() function.

I have some indicators which are still written this way, however some got recompiled recently (i don't know when or why) and since then, they are not working correctly because IndicatorCounted() is now always returning 0.

I don't have the old compiler anymore, and i cannot believe that this is happening now!

Is there a  workarround for this???

graziani
1894
graziani 2016.06.28 11:33  

OK, this was a bug that was present on b950, on b971 it is gone.

As you can guess, i wasn't trading for some time, otherwise i would have noticed this before for sure.

And b950 was 'stable' for a long time, how come nobody noticed that, i searched for report of this issue and found none.... 

Fernando Carreiro
1502
Fernando Carreiro 2016.06.28 11:54  
graziani:

OK, this was a bug that was present on b950, on b971 it is gone.

As you can guess, i wasn't trading for some time, otherwise i would have noticed this before for sure.

And b950 was 'stable' for a long time, how come nobody noticed that, i searched for report of this issue and found none.... 

Actually, I recently had heated debate with another member here, about not mixing the old style (start(), IndicatorCounted(), Bars) with the new style (OnCalculate(), prev_calculated, rates_total) for the very fact, that the old style could soon become obsolete. Well, it seems that it has become a reality.

However, since it has been a long time since build 600, it has been more than enough time for developers, be they professional or amateur, to have updated their current code accordingly. Obviously, code that is no longer in use, can just be scrapped, but if your trading depends on code that you use quite often, then keeping it up-to-date with current conditions, is the responsible thing to do.

graziani
1894
graziani 2016.06.28 14:48  

When starting something new, it is clear that one should use the contemporary methods to get the most out of design.

However, there is enough work to do without need to maintain something that was working correctly, so i find this issue unacceptable. A level of compatibility must exist.
Before every upgrade i have to check if my verified & tested sw is still working well? That is not acceptable. 

There is a reason i am using modular design: i have written an indicator, tested it and verified that it works correctly, i am not interested in rewriting it, testing it and verifying that it works correctly whenever MQ decides that something can be done different. If there is a need for change, i will rewrite it according to new rules.

whroeder1
13627
whroeder1 2016.06.28 17:25  
graziani: , so i find this issue unacceptable. A level of compatibility must exist.
This is a user's forum not Metaquotes.
Fernando Carreiro
1502
Fernando Carreiro 2016.06.28 17:44  

graziani:

... so i find this issue unacceptable. A level of compatibility must exist ...

Say that to the hundreds (if not thousands) of 8 and 5 inch floppy disks I have in the basement with old CP/M and also MS-DOS software, from yester-decade. I don't know your age, but I wonder if you still remember those.

Imagine, how our PC's, Laptops, Notebooks, Tablets and SmartPhones would look like, if they were to still support floppy disks, CP/M and MS-DOS.

graziani
1894
graziani 2016.06.28 18:54  
graziani
1894
graziani 2016.06.28 18:59  
FMIC:

Say that to the hundreds (if not thousands) of 8 and 5 inch floppy disks I have in the basement with old CP/M and also MS-DOS software, from yester-decade. I don't know your age, but I wonder if you still remember those.

Imagine, how our PC's, Laptops, Notebooks, Tablets and SmartPhones would look like, if they were to still support floppy disks, CP/M and MS-DOS.


Good example, all that sw can still run as is, so if it's practical you can still use it.
Fernando Carreiro
1502
Fernando Carreiro 2016.06.28 20:48  
graziani:

Good example, all that sw can still run as is, so if it's practical you can still use it.
No, that software no longer works on any modern PC even if I were able to transfer it from a floppy disk. It can only run in emulators.
Ovo Cz
2951
Ovo Cz 2016.06.29 10:06  
FMIC:

Actually, I recently had heated debate with another member here, about not mixing the old style (start(), IndicatorCounted(), Bars) with the new style (OnCalculate(), prev_calculated, rates_total) for the very fact, that the old style could soon become obsolete. Well, it seems that it has become a reality.

However, since it has been a long time since build 600, it has been more than enough time for developers, be they professional or amateur, to have updated their current code accordingly. Obviously, code that is no longer in use, can just be scrapped, but if your trading depends on code that you use quite often, then keeping it up-to-date with current conditions, is the responsible thing to do.

Well, I do not agree.

I am an pure OOP  designer, so I welcome language changes started with the build 524. But:

- There is not a single command marked as deprecated or obsolete in MQL4 (but the event methods). Nothing is marked as "not supported any longer".

- There are many duplicated commands in MQL4, many duplicated approaches, resulting from the crazy mix of the old MQL4 and the new MQL5. None of those equivalents marked as preferred. And they are not aliases for the same function, I realised that even if one of them works, the other may have a bug. When I have no knowledge of MQL5, I am very probably picking the command alias I have been using for long time.

So, it is not fair silently expecting coders "to update their current code accordingly". I would like to, but the information is not spread.

BTW, the IndicatorCounted example in docs is also with the old-fashioned start() method. I would not even expect they are obsolete when reading the docs.

Alain Verleyen
Moderator
28627
Alain Verleyen 2016.06.29 10:52  
Ovo:

Well, I do not agree.

I am an pure OOP  designer, so I welcome language changes started with the build 524. But:

- There is not a single command marked as deprecated or obsolete in MQL4 (but the event methods). Nothing is marked as "not supported any longer".

- There are many duplicated commands in MQL4, many duplicated approaches, resulting from the crazy mix of the old MQL4 and the new MQL5. None of those equivalents marked as preferred. And they are not aliases for the same function, I realised that even if one of them works, the other may have a bug. When I have no knowledge of MQL5, I am very probably picking the command alias I have been using for long time.

So, it is not fair silently expecting coders "to update their current code accordingly". I would like to, but the information is not spread.

BTW, the IndicatorCounted example in docs is also with the old-fashioned start() method. I would not even expect they are obsolete when reading the docs.

I agree with you, the way Metaquotes is doing things is to say the least "weird".

But we have to deal with it, and here I agree with Fernando, it's not that hard to know what has to be used to be ready for future, mainly for a professional programmer. For amateurs that's an other matter, it's completely confusing.

My advice, code to be compatible with mql5 at maximum. mql4/MT4 is just dying even if most people don't know it yet (or don't want to know it).

/
To add comments, please log in or register