MetaTrader 4 Build 529 beta released with new compiler - page 108

 

Am I the only one?

History all by symbol is loaded by F2. I'm running tests on all ticks. One week only. From 2013/12/02 to 2013/12/10.

The tester begins to load M1 and that's it... Put out the light, throw a grenade. 8 minutes of history loading, then another five minutes of the whole system hovering. Then for another three minutes I pressed Abort on the popped up windows from Mozilla, that the script wasn't responding ... Only started testing about 15 minutes after pressing Start in the tester. And it's like this every time I start up on all the ticks. This hasn't happened before.

 
MetaDriver:

I try never to give folders Russian names at all. To avoid such problems.

// And no patriotism at night. :)


Only in the daytime? :)
 
tara:

Only during the day? :)
Also at sunset sometimes
 
artmedia70:
Also at sunset sometimes


Love the Motherland, Your Mother!
 

The function places a text object in the given graph window:

//+----------------------------------------------------------------------------+
void SetArrowText(int ww, string text, color cl, string font="Arial", string nm="", datetime t1=0, double p1=0, int sz=0) {
   if (ObjectFind(nm)<0) ObjectCreate(nm, OBJ_TEXT, ww, 0, 0);
   ObjectSet(nm, OBJPROP_TIME1    , t1);
   ObjectSet(nm, OBJPROP_PRICE1   , p1);
   ObjectSetText(nm, text,sz, font, cl);
}
//+----------------------------------------------------------------------------+

I call it like this:

         if(DrawGraphics) {                           // если рисуем графические объекты
            nm=Prefix+"_RPBar_"+TimeToStr(Time[i]);
            SetTLine(RedPointLineColor,0,nm,Time[i],Low[i],Time[i],WindowPriceMin(0),false,redPointLineStile,redPointLineWidth);
            wnd=WindowFind("i_StdDev("+sdperiod+")"); // номер окна индикатора
            if(wnd>0) {                               // если индикатор на графике, нарисуем метку
               nm=Prefix+"_RedPoint"+TimeToStr(Time[i]);
               SetArrowText(wnd, "RP", RedPointArrowColor, RedPointFont, nm, Time[i], dev(i), redPointArrowSize);
               }
            }

I.e., first we draw the trend line on the price chart, then, if there is an indicator window, we draw a text object in it. The trend line on the price chart is displayed correctly and it is positioned where it should be - at the time of event occurrence. However, the text in the indicator window - oh my god ... it moves behind the zero bar. And here begins the most interesting thing. Both the text and the text label behave exactly the same - they stay where they were placed. As soon as you make the text object selected and, lo and behold, it stays where it is. Let's illustrate. All text objects have piled up near zero bar (I have moved the chart back and forth, and the objects stay where they were standing because they are not on zero bar):


But now I'll just click on them with the mouse and they will all take their places:


ZS. That they removed from the names of objects the path to them from the data directory - thank you.

 
 
artmedia70:



Working for vra?))
 
Patrol:

Yes, I have already understood that. I wanted to make sure I understood the new structure correctly, so I referred to MQL4\Samples\DLLSample\DLLSample.cpp in the new 555 build, but it is still there:

I think it should be this way, as I understand it:

Please clarify.

Yes, you got it right.

PS. By the way, you may solve the problem with little effort.

Form an array of structures in the old format and transfer this array to a DLL, just like before. Which will not need to be rewritten either.

 
Zhunko:
Replacing the bar structure is not just an ambush, it's an ambush!
This problem is very easy to solve. You form an array of structures in the old format and, as before, pass it to the DLL
 
stringo:
This problem is very easy to solve. You form an array of structures in the old format and, as before, pass it to the DLL

That's just something I said in jest. The work of the old function does not change.

About 4 years ago I started writing a set of classes for all occasions with quotes history. I've been doing it for 3 years, along with tests. At first, I wanted to make a bar structure template with three parameters but then I saw that no one uses such a variety. I decided to make it with two parameters. Now I will have to add some more, though.

Reason: