IndicatorCounted() within start(), old way not working anymore

 

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???

 

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.... 

 
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.

 

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.

 

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.

 
 
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.
 
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.
 
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.

 
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).

Reason: