How to make MT4 auto refresh - page 4

To add comments, please log in or register
Mladen Rakic
148084
Mladen Rakic  
sameermehta74:
Dear Mladen, thank you for very quick reply. Just another clarification; do I need to attach AutoRefreshTimer to all the charts which have EA active or only to any chart of the MetaTrader. Regards Sameer

Sameer

To each chart where you have an EA

But if you have multiple charts with same symbols and with same time frames opened with EAs attached to it, then you need different autorefresh than any posted here

sameermehta74
52
sameermehta74  

Dear Mladen, I just checked the template of Expert Advisor Builder for MetaTrader 4. Have attached the template for your perusal. In this template I just noticed that even if line number 21 is (extern bool EachTickMode = True;) but then line 33 is (bool TickCheck = False;). Is this contradictory or it is supposed to be like that. Would making line 33 = True solve my problem. Thanks a million for your help. Regards Sameer

Files:
Mladen Rakic
148084
Mladen Rakic  
sameermehta74:
Dear Mladen, I just checked the template of Expert Advisor Builder for MetaTrader 4. Have attached the template for your perusal. In this template I just noticed that even if line number 21 is (extern bool EachTickMode = True;) but then line 33 is (bool TickCheck = False;). Is this contradictory or it is supposed to be like that. Would making line 33 = True solve my problem. Thanks a million for your help. Regards Sameer

I never worked with Expert advisor builder but as far as I know it is producing EAs that work (as much as something generated automatically can work). If the EA does not work, and it usually works, attaching the eutorefresh time can not hurt - at least you will be sure that EA start procedure is called each n seconds

Mladen Rakic
148084
Mladen Rakic  
mladen:
Autorefresh that works based on timer not based on ticks (it will work even when there are not ticks) : autorefresh_timer.mq4

Guys

In build 650 and 652 this does not work any mory

Sorry, but that is what metatrader did : what worked before does not work any more. OnTimer() function is not called at all any more (and it should) and it was working perfectly in previous builds

test
1232
test  
mladen:
Guys

In build 650 and 652 this does not work any mory

Sorry, but that is what metatrader did : what worked before does not work any more. OnTimer() function is not called at all any more (and it should) and it was working perfectly in previous builds

Some other things does not work any more

It is worse and worse with each build

Mladen Rakic
148084
Mladen Rakic  

Correction

OnTimer() works, but

You have to restart the terminal if you compile the indicator. If you do not restart the terminal, does not matter what you do, it will not work. It seems thatcompiler kills the timer forever

One more bug to the collection

test
1232
test  
mladen:
Correction

OnTimer() works, but

You have to restart the terminal if you compile the indicator. If you do not restart the terminal, does not matter what you do, it will not work. It seems thatcompiler kills the timer forever

One more bug to the collection

So, we are going to have to reastrat terminal each time we compile something (in order to be sure that it is not our coding error). Fantastic. This is the first compiler in the world that had that "feature". Congratulations mq

techmac
2973
techmac  
checkin:
So, we are going to have to reastrat terminal each time we compile something (in order to be sure that it is not our coding error). Fantastic. This is the first compiler in the world that had that "feature". Congratulations mq

They were completely unaware of those problems

So much about how they test what they develop

Mladen Rakic
148084
Mladen Rakic  
techmac:
They were completely unaware of those problems So much about how they test what they develop

The biggest problem is not OnTimer()

By far the biggest problem is the Sleep() function

_________________________

The reason is the following : a lot (and I mean a lot) of EAs, when they try to do something with an order, if there is an error, pause for some time (usualy 1 to 3 tenths of a second) and then try again. For that pausing Sleep() function is used.

Now imagine that instead of waiting 1/10th of a second your EA starts to wait 10,15 seconds. And that is exactly what it is going to do if you compile anything (and I mean anything). Your EA will start to work like a snail and you will not be aware of. And now imagine news time ...

That is what they are preparing to be a "release" version ...

That "release" version will be hitting directly into EAs. Good luck to all that are using Eas (this is just one of errors that are affecting the EAs directly).

techmac
2973
techmac  

Yep

And as I see it does it to any ex4 - it will be "wonderful"

To add comments, please log in or register