Marbo
538
Marbo  

@mladen: Great, thank you very much! Much better than before. But one question: I saw that you added the condition i==0 before an alert should be displayed. Why isn't it enough to check lastAlertAt=!Time[0] ? It would be very helpful for my mql4-learning if you explained that.

Marbo
538
Marbo  

Thanks for the explaination! I will try to pull it out of the main loop and make some further experiments...

Dmitri
21
Dmitri  

Mladen-could not help me with my question m from the post 4142; Thanks in advance! Sorry for my english ...

Mladen Rakic
196816
Mladen Rakic  

bratcevdg

Here is a post which explains why I do no make alerts for recalculating and / or repainting indicators : https://www.mql5.com/en/forum/180648/page273

SSA is recalculating

bratcevdg:
Mladen-could not help me with my question m from the post 4142; Thanks in advance! Sorry for my english ...
Mladen Rakic
196816
Mladen Rakic  

...

Adding alerts on a repainting or recalculating indicator is like riding on a train without brakes : you get a "signal" and then it is changed, and again, and again ... and in the mean time you entered the position based on a "signal"

Even if it is a correctly coded recalculating indicator (not a wrongly coded repainting indicator) they should, in my opinion, always be used in an estimation mode, never in signaling mode (so not even in "alerting" mode) otherwise, whoever does that is playing a very dangerous game

Mladen Rakic
196816
Mladen Rakic  

...

You want to check for alerts only once primarily because of the speed but also because to avoid repeated alert (just remember that Time[0] will change for a new bar). That whole code can even be pulled out the loop completely (I usually do that, didn't do it in this case to keep it similar to your code) and I think that it is even better that way : when it is out of your main loop it will always be executed only once per tick and you can strictlu control what do you wish to do at that "once per tick" occasion

Marbo:
@mladen: Great, thank you very much! Much better than before. But one question: I saw that you added the condition i==0 before an alert should be displayed. Why isn't it enough to check lastAlertAt=!Time[0] ? It would be very helpful for my mql4-learning if you explained that.
Dmitri
21
Dmitri  

Mladen thanks for answer! Readings from H4 to M15 also can be done?

forexlove
13
forexlove  
mladen:
Multi time frame color stochastic coded by godzilla ...

hi mladen,

can u make this indi mq4?

and alert.. Thanks!

Dmitri
21
Dmitri  

Dear Mladen not refuse a request! It is necessary that the reading from H4 to appear on the M15! It is very necessary! Thanks in advance!

Mladen Rakic
196816
Mladen Rakic  

...

Did you read the post I am referring to at all?

If not please read it. Here is the link to that post again : https://www.mql5.com/en/forum/180648/page273

all the best

bratcevdg:
Dear Mladen not refuse a request! It is necessary that the reading from H4 to appear on the M15! It is very necessary! Thanks in advance!