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

 
Candid:

The demo versions of the indicators do not start. By right-clicking the test is not offered at all, by double-clicking and then pressing the "Test" button the tester is loaded, but does not respond to the "Start" button at all. The Strategy Tester's journal remains blank. Expert Advisors are launched. Build 555.


In 558 there is a slight change, if before the described procedure with double click the record about loading and the next one about unloading of indicator appeared in the general journal, now the record about unloading doesn't appear. In addition, the indicator is now shown in the tester without mentioning the "market" folder. But the tester log is still pristine.

As far as I understand, nobody deals with the problem of testing demo-versions of indicators, it seems to be an echo of search of errors in testing of Expert Advisors. Maybe, it will be easier to find the error by testing the indicators?

 
stringo:

The IndicatorCounted() function was originally a crutch. Who has programmed indicators in three, will understand what I mean.

We have found an elegant solution in five with parameter prev_calculated and return of the number of calculated bars in function OnCalculate. And this solution has now moved to the new four



A long time ago, but still nice :)
 
Candid:
Would testing indicators make it easier to find a fault?
There will beindicator testing, but not right now. But it will.
 
Kim's object creation function seems to be obsolete due to OBJPROP_ANCHOR input. I will check it now, but there are still some problems with the graphics. I'll try to post all the details with examples later.
 
stringo:

I repeat. We're doing as in Five. Be kind enough to apply one more anchor point - specify where in the object the "anchor" point of the object is located. In your case, the upper right corner of the object.




So, the ObjectSet function works differently in the new version of the terminal than in the old one. And we will have to change a bit all Expert Advisors that use output on a chart.

In the previous version, if we select ObjectSet(Name,OBJPROP_CORNER, 1);
, the "anchor" point would automatically become on the upper right corner of the object. Do you plan to leave this, for compatibility?

 
alexvd:

Tried to cast an EA on a chart (not in the strategy tester)? Any messages in the logbook?


PS. The problem was fixed. We will wait for the next build with a fix.

1. No, I did not try to attach an EA to a chart. I did not see any entries in the Tester's journal, except for the standard output of its settings. Therefore, I got output from init() of the EA, but there was no output from start() of the EA in the journal.

2. promptly. Thank you, we look forward to it.

 
Lion.Fx:

It turns out that the ObjectSet function works differently in the new version of the terminal than it did in the old one. And we will have to change a bit all the Expert Advisors that use output of information on the chart.

In the previous version, if we do: ObjectSet(Name,OBJPROP_CORNER, 1);
The anchor point was automatically placed at the upper right corner of the object. Are you not planning to leave this, for compatibility?

Well, yes, it is desirable to leave the default anchoring as in old builds.
 
Just checked Kim's function, which has served faithfully for many years :) (thanks to him again).
Adding OBJPROP_ANCHOR parameter to it allowed to put the objects in their places (no unclear coordinate shift).

Thank you for adding ANCHOR. It's more convenient, though you'll have to fix a lot of things with it.

Here is the function:

//+------------------------------------------------------------------+
void SetLabel(string nm, string tx, string ft,color cl, int xd, int yd, int cr=0, int anch=0, int fs=9) {
  if (ObjectFind(nm)<0) ObjectCreate(nm, OBJ_LABEL, 0, 0,0);
  ObjectSetText(nm, tx, fs,ft);
  ObjectSet(nm, OBJPROP_COLOR    , cl);
  ObjectSet(nm, OBJPROP_XDISTANCE, xd);
  ObjectSet(nm, OBJPROP_YDISTANCE, yd);
  ObjectSet(nm, OBJPROP_ANCHOR, anch);   //<----------------
  ObjectSet(nm, OBJPROP_CORNER   , cr);
  ObjectSet(nm, OBJPROP_FONTSIZE , fs);
}
//+------------------------------------------------------------------+

and call:

  SetLabel("Hello",  "Hello" ,  FontType, FontColor,  20, 20, 3, 1, FontSize);

 
Lion.Fx:

It turns out that the ObjectSet function works differently in the new version of the terminal than it did in the old one. And we will have to modify a bit all the EAs that use the information output on the chart.

In the previous version, if we do: ObjectSet(Name,OBJPROP_CORNER, 1);
Then the "anchor" point would automatically go to the upper right corner of the object. Do you plan to leave this, for compatibility?

It makes sense. Let's see what we can do.

PS. Have done exactly that.

 
I made an addendum to the open application in ServiceDesk #907205 and attached a code to check it.