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

 

Noticed one unpleasant feature of the Find-Replace option in ME881. Checked ME482, same thing there. Maybe while you are busy updating MT and fix this too?

So, in order: my code is long, for routine changes I use "Find-Replace" throughout the text. Tried to change all x1+3 to x1, seems to be ok. But my code contains lines with x1+3+3*abc. These lines instead of x1+3+3*abc changed to x1+3*abc resulted in x1*abc . And as it turns out, there can be as many of these +3's as you like, it will still be x1*abc. Rows with e.g. x1+3+4*abc change correctly.

This is a very single and rather curious case. Of course, this correction is not urgent, but I think it is necessary to avoid troubles during coding.

 

Doesn't work.

ObjectSetString(chart_id,current_name,OBJPROP_NAME,new_name)

Although the function returns true, the object in the graph has the old name.

 

I don't know if this is a bug or not, but when calling Comment () in OnDeinit() the information is not displayed on the chart

example code

int OnInit()
  {
Comment("OnInit");
  return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   Comment("Exit");
   Print(__FUNCTION__,"_Код причины деинициализации = ",reason);
  }
//+------------------------------------------------------------------+

it means when deinitialising an EA, we can only get deinitialisation and other info via print ?

 
OnChartEvent
Doesn't work in the strategy tester
 

build 563:


ObjectSet(labelobj,OBJPROP_CORNER,CORNER_LEFT_LOWER)

puts a label in the RIGHT corner...

 
pro_:

Have an Alert with the name of each different MT4 instance written in it... When it pops on screen you should know which one it is.

Alert() blocks the EA/indicator...

Would be nice if MT4 alerts (from the Alerts tab) had a MQL API too.

 
maximillion:

Alert() blocks the EA/indicator...

Would be nice if MT4 alerts (from the Alerts tab) had a MQL API too.


What do you mean "Alert() blocks the EA/indicator..." ? No it doesn't. When do you want the icon to flash? When some action is performed by EA? Well, just place the alert right there in the code and be happy. :) A millisecond delay spent on giving you an Alert won't cause a major disruption, would it ? :)

 
pro_:


What do you mean "Alert() blocks the EA/indicator..." ? No it doesn't. When do you want the icon to flash? When some action is performed by EA? Well, just place the alert right there in the code and be happy. :) A millisecond delay spent on giving you an Alert won't cause a major disruption, would it ? :)


Hm. Indeed it does not (just tried it in an EA). But at the same time I know I stopped using it 'cause it would block.


Anyway thank you for pointing it out.

 

I think there is a bug The advisor cannot call a function from the library

EA code calling the function

#property strict
#import "bib.ex4"
int ins();
#import 

void OnTick()
  {
int z = ins();  
Comment(z);
  }

library code

#property strict

int ins()
{
int a=1, b=1,c=1,d=0;
d=a+b+c;
return d;
}

Log error

  • 2013.12.22 12:54:45.408 2013.08.19 05:16 Access violation write to 0x00000000
  • 2013.12.22 12:54:45.408 2013.08.19 05:16 Cannot find 'ins' in 'bib.ex4'


 

Build 563, not working

ChartSetInteger(0,CHART_SHOW_DATE_SCALE,false);
ChartSetInteger(0,CHART_SHOW_PRICE_SCALE,false);