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

 
evillive:
What horrors are written here, I'll refrain from updating above 553 for the time being...

I've started to have problems with the output of graphical objects. At one point in the code, a function

//+----------------------------------------------------------------------------+
void SetTLine(color cl, int wnd, string nm="",
              datetime t1=0, double p1=0, datetime t2=0, double p2=0,
              bool ry=False, int st=0, int wd=1) {
   if (ObjectFind(nm)<0) ObjectCreate(nm, OBJ_TREND, wnd, 0,0, 0,0);
   ObjectSet(nm, OBJPROP_TIME1 , t1);
   ObjectSet(nm, OBJPROP_PRICE1, p1);
   ObjectSet(nm, OBJPROP_TIME2 , t2);
   ObjectSet(nm, OBJPROP_PRICE2, p2);
   ObjectSet(nm, OBJPROP_COLOR , cl);
   ObjectSet(nm, OBJPROP_RAY   , ry);
   ObjectSet(nm, OBJPROP_STYLE , st);
   ObjectSet(nm, OBJPROP_WIDTH , wd);
}
//+----------------------------------------------------------------------------+

called as follows:

//==============================================================================
// --------------------------------- Данные -----------------------------------+
//==============================================================================
   if(DrawGraphics) {                           // если рисуем графические объекты
      wnd=WindowFind("i_StdDev("+sdperiod+")"); // номер окна индикатора
      if(wnd>0) {                               // если индикатор на графике, нарисуем метку
         nm=Prefix+"_Текущий бар";
         p1=WindowPriceMax(wnd); p2=WindowPriceMin(wnd);
         SetTLine(Blue,wnd,nm,Time[0],p1,Time[0],p2,false,2);
         }
      }
//-----------------------------------------------------------------------------+   

outputs a vertical trend line in the indicator window without any problems (I mark the zero bar to facilitate visual perception of indicator points during debugging):


When I call the same function from another place in the code like this:

   if(op==OP_SELLSTOP) {
      pp=MathMin(Low[x],Low[x-1])-distanceSetOrders*PointX;
      b=iLowest(sy,tf,MODE_LOW,2,(x-1));
      if(pb-level*Point>pp) {
         ll=LotsS;
         if(StopLoss==0) sl=0;
         else sl=NormalizeDouble(MathMax(pp+StopLoss*PointX, pp+(level+1)*Point),dg);
         if(TakeProfit==0) tp=0;
         else tp=NormalizeDouble(MathMin(pp-TakeProfit*PointX, pp-(level+1)*Point),dg);
         co="Отложенный";
         Message("Кто звал? Чё..., ставить? Ставлю SellStop относительно бара "+b+
                 ", от "+DoubleToStr(pp,dg)+" до "+DoubleToStr(Low[b],dg)+" рисую линию");
         SetOrder(sy, OP_SELLSTOP, ll, pp, sl, tp, mn1, co);
         if(DrawGraphics) {
            nm=Prefix+"_Наименьшая цена_"+TimeToStr(Time[b]);
            SetTLine(FireBrick,0,nm,Time[b],Low[b],Time[b],pp,false,3);
            }
         }
      }

it mark on the chart the bar from which the pending order level is calculated, then, strange as it may seem, parameters passed to it show true and correct values; the bar time is written to the trend line name, but the line itself has all zero values and moreover it is displayed as a "Ray", though I pass "false" to the function parameter, responsible for this option - not a ray:


I don't see an error in the code. Could it be a glitch?
 
The graphics seem to have been completely killed off... No buttons appearing on the screen. I didn't do anything, just reloaded the terminal, and EAs that were hovering on charts and drawing all graphical objects normally died. Waiting a few days to fix the graphical objects.... hmmm.... Waiting for.... So, I guess I will just have to suffer the same fate. :) Will have to wait for the new build.
 
Have you recompiled the programmes with the new build?
 
artmedia70:

I've started to have problems with the output of graphical objects. At one point in the code, a function

called as follows:

outputs a vertical trend line in the indicator window without any problems (I mark the zero bar to facilitate visual perception of indicator points during debugging):


When I call the same function from another place in the code like this:

I can use it to mark the bar in the chart, from which the pending order level is calculated, however strange it is, the parameters passed to it show true and correct values, the bar time is written to the trend line name, but the line itself has all zero values and is displayed as a "Ray", though I pass false - not a ray - to the function parameter responsible for this option:


I don't see an error in the code. Could it be a glitch?
Add a printout of all parameters inside the SetTLine function.
 

And again, a question about the timing... When will the Market be fully launched ??? When will there be a global update ???

There was talk of a month of tests at the end of November, but December is already in full swing ....

 

Renat,

Are there any plans in the near future for the new ME4 to support

ENUM_ANCHOR_POINT and ENUM_LINE_STYLE ?

Thank you.

 
Wahoo:

Renat,

are there any plans for support in the near future in the new ME4

ENUM_ANCHOR_POINT and ENUM_LINE_STYLE ?

Yes, they are. The graphical model will be the same as in MQL5.

We add and improve graphical functions with every build.

 

One of the brokers (at least one) when new MT4 builds are released, especially with significant innovations, first try them out on a demo, and then implement them on a real account.

Because of the fact that some beta-testers unintentional semiautomatic updating of neighbour terminals, can we be sure that the demo and the real terminals, being on one computer (or VPS), will be able to observe these tactics during the introduction of these changes? Or one folder, which is used to manage updates of all terminals in the system and which is recommended to be removed "to avoid", leaves only two choices: all or nothing?

 

Do not run tests or updates on computers with working copies of the terminals.

They will all update automatically as soon as at least one copy on the computer receives an update.

Reason: