Why is the news indicator not working in Windows 7? - page 17

 



Hello Zhunko, this is not a request, just a thought "out loud". The following seems naive to me.

I don't know why the author put "Server Time" parameter in manual mode, because it's so easy to automatically subtract/add the time offset of quotes from/to the news release time.For example, I sometimes jump from a four-digit broker to five-digit, I have to use templates. The "Local Time" option is not needed at all, just let the machine itself, automatically look through my local time and recalculate everything correctly, and there's no summer and winter time to consider - it's a pain in the ass. But after that the human factor is excluded!

 
You can remove all the time settings. I don't want to bother. There are more important tasks. I use the indicator when something does not work on the main project. I relax this way.
 

Found a little bug :)

If the indicator shows any number of news, but 0 old news, then the indicator shows the future news, but under the heading "Past news",

It's not a big deal, but it's not pretty :)

Fix it, please

 
And next, a small request, if you don't mind, make a choice - the colour of the news text remains white or coincides with the colour of the importance lines, so that the list immediately shows how important the news will be ahead, instead of changing the scale / timeframe to see what's over the horizon :)
 
Sleeky:

Found a little bug :)

If the indicator shows any number of news, but 0 old news, then the indicator shows the future news, but under the heading "Past news",

It's not a big deal, but it's not pretty :)

Fix it, please.

Fixed it.

Sleeky:

And next, a small request, if it is not a problem, make a choice - the colour of news text remains white or coincides with the colour of the importance lines, so that the list immediately shows how important news will be ahead, not to change the zoom / timeframe to see what is over the horizon :)

Comments are not coloured. We have to do text labels. I won't for now. Maybe someone else will join in...?
Files:
news_3_18.mq4  27 kb
 
Zhunko:

Corrected.

Comments are not coloured. Gotta do text labels. Not going to do it yet. Maybe someone else will join in...?

Thanks.

Got excited too soon :)

Still writes the line ___ past news _____,

When I have OldNews=0 and only future news on the chart.

And the comments on the news at the line, you can bring back vertical, otherwise it's a mess (or make a switch - horizon/vertical)


 
Zhunko:

Corrected.

Comments are not coloured. Gotta do the text labels. Not yet. Maybe someone else can join in...?

Here's if it helps.

//------------------------------------------------------------------ Comment2
void Comment2(string inf, color clr=Red, int corn=1, int x0=20, int y0=20, int fontsize=8, string font="Tahoma")
{
        string str[100]; int i, j, k; inf=" "+inf;
        for(i=0, j=0, k=1; i<1000 && k>0;) // составляем массив
        {
                k=StringFind(inf, "\n", j); // нашли разделитель
                if (k==0) str[i]=StringSubstr(inf, j, 0); else str[i]=StringSubstr(inf, j, k-j);
                i++;
                j=StringFind(inf, "\n", j)+1; if (j==0) break; // если не нашли следующего разделителя, то выходим
        }
        
        int dy=fontsize*1.5;
        for (j=0; j<i; j++)
        {
                SetLabel("inf"+j+corn+x0+y0, 0, str[j], clr, x0, y0+dy*j, corn, fontsize, font);
        }
}
//------------------------------------------------------------------ SetLabel
void SetLabel(string name, int wnd, string text, color clr, int x, int y, int corn, int fontsize, string font)
{
        ObjectCreate(name, OBJ_LABEL, wnd, 0, 0); ObjectSet(name, OBJPROP_CORNER, corn); 
        ObjectSetText(name, text, fontsize, font, clr); 
        ObjectSet(name, OBJPROP_XDISTANCE, x);  ObjectSet(name, OBJPROP_YDISTANCE, y); 
}
 
Sleeky:

Thank you.

Got excited early :)

Still writes the line ___ past news _____,

When I have OldNews=0 and only future news on the chart.

And comments to news at the line, you can return vertical, otherwise a total mess (or make a switch - horizon/vertical)

You have some kind of mt4 malfunction. Everything works for me.

 
Zhunko:

Are you having some kind of mt4 malfunction. It's working for me.

Got it, sorry. Let's clean up, have a PHD :)
 
Zhunko:

Are you having some kind of mt4 malfunction. Everything works for me.

I have it in Ukraine too.