praise, one possible bug and some suggestions

 
Hello!

Let me first say, that MetaTrader 4 is on of the finest pieces of software I have ever seen in any field. I'm a software developer myself and probably look software differently, but I really get a kick out of this program just by using it. It thoughtful, it is well designed, not a pixel or field out of place and a dream to program (especially for a C++ guy like me). Excellent job done and every dollar earned (by selling it) well deserved!

So much for the praise, but I have a couple of comments anyway. :-)

iCustom: I'm using a iCustom call in an Expert. In the Journal I get tons of "indicator loaded" messages (seems to be one for each tick) and at the end of the Expert/Journal ther are tons of "indicator unloaded" messages.

Help File: I did look for a way to pass variables by reference for some time. I eventually found it in a sample but it would probably be a good idea to add this to the "function definition" chapter in the help file.

Suggestion: What would be nice is if there would be a way to chang the order of symbols in the Market Watch. I usually deal only a few major pairs (3-5 maybe) and defining the order and maybe allowing a bigger font would be nice.

Suggestion#2: Display SL and TP lines in the Chart window (for active orders) in different colors or make colors user defined. And maybe just with a dotted line instead of dash-dot.

Suggestion#3: Allow a Default Chart profile which is used by all charts which are opened for the first time or at least for the "Show Chart" window in the Backtester. I'm doing a lot of backtesting and did not find a way to change the style in which these come up and when aplying a chart template to this window the Buy/Sell symbols are lost.


Okay, so much for now ... as said this is an excellent program and please take the suggestions as just what they are: suggestions. I don't need an answer on these (except if the feature is already there and I missed it), but I'd like to know about the iCustom thing.

Many thanks and keep up the good work


Markus
 
In the market window, just drag and drop the currency quote to a different location. Right clicking on a quote will give options to hide or show all too. (Just because its hidden doesn't mean you can't access it for other operations.)
 
btw, I am interested in passing parameters by reference. What sample did you find this in? have you confirmed it's doing what it is suppose to?
 
David,

thanks I'll that.

Regarding reference, the syntax is as in C++ (sorry, I don't remember where I saw it). I'm used that many times now, so I'm sure it works.


start()
{
   int rc;
   double nums[];
   string reason;

   rc= somefunc(results, reason);
   Print(nums[0], nums[1], reaons);

   return (rc);
}

int somefunc(double &returns[], string &reason)
{
   ArrayResize(returns, 2);
   returns[0]= 1.0;
   returns[1]= 1.1;
   reason= "sheer dumbness";
   return (false);
}
 
Thank you much. Very glad to know about this. I wonder if it can be used with externally declared functions (for calling DLL exported functions). I was dreading have to declare several functions to return multiple values from a dll routine.

I apologize for hijacking your thread. for that I'll now remind MQ.

MQ: Shimodax still needs responses to his other issues :)
 
David,

regarding the symbols window: Gosh ... I'm sure I tried dragging them around ... sometimes I wonder what I'm doing?!?!

Didn't try DLLs yet, but would expect it to work one way or another. (I haven't tried C pointers syntax yet, maybe even that will work.)


Markus
 
some indicator (and custom indicator too) puts their results into indicator line buffer (up to 8 buffers). when calling some indicator function you get result from from 0-th...7-th buffer. one result per one call. indicator calculated only one time per tick. if you call iCustom (or so on) severe times then it is calculated first time only - other calls get previously calculated results. how use parameters by reference in this case?
simplify your code
 
Slawa,

I'm guess I meant something else. I have used iCustom in one particular case I'm getting a "<name> EURUSD,M15: loaded successfully" each time I call the function.

21:15:06 2005.08.26 03:17  0-RossFX EURUSD,M15: loaded successfully
21:15:07 2005.08.26 03:17  0-RossFxSys EURUSD,M15: NewRange [0 0 ... 0]
21:15:07 2005.08.26 03:17  0-RossFxSys EURUSD,M15: NewRange [0 ... 0]
21:15:07 2005.08.26 03:30  0-RossFX EURUSD,M15: loaded successfully
21:15:07 2005.08.26 03:30  0-RossFxSys EURUSD,M15: NewRange [0 0 ... 0]
21:15:07 2005.08.26 03:45  0-RossFX EURUSD,M15: loaded successfully
21:15:08 2005.08.26 03:45  0-RossFxSys EURUSD,M15: NewRange [1.2293 0 ... 0]
21:15:08 2005.08.26 04:00  0-RossFX EURUSD,M15: loaded successfully
21:15:08 2005.08.26 04:00  0-RossFxSys EURUSD,M15: NewRange [1.2293 1.2279 ... 1.2293]




At the end I get tons of unloaded messages:

21:15:12 2005.08.26 06:00  0-RossFX EURUSD,M15: removed
21:15:12 2005.08.26 06:00  0-RossFX EURUSD,M15: removed
21:15:12 2005.08.26 06:00  0-RossFX EURUSD,M15: removed
21:15:12 2005.08.26 06:00  0-RossFX EURUSD,M15: removed
21:15:12 2005.08.26 06:00  0-RossFX EURUSD,M15: removed
21:15:12 2005.08.26 06:00  0-RossFX EURUSD,M15: removed
21:15:12 2005.08.26 06:00  0-RossFX EURUSD,M15: removed
21:15:12 2005.08.26 06:00  0-RossFX EURUSD,M15: removed
21:15:12 2005.08.26 06:00  0-RossFX EURUSD,M15: removed
21:15:12 2005.08.26 06:00  0-RossFX EURUSD,M15: removed
21:15:12 2005.08.26 06:00  0-RossFX EURUSD,M15: removed
21:15:12 2005.08.26 06:00  0-RossFX EURUSD,M15: removed




The only difference I see to the cases where this does not happen is that I'm passing parameters on to the Indicator (and not just using the default). But these parameters are always the same (from user Inputs on the Expert).

      double d= iCustom(NULL, 0, "0-RossFX", gARO_Period, gBreakoutTolerance, gMinClusterBars, true, true, 0, 1);



Regards


Markus

 
I guess what I'm trying to say is that it may be a good idea to avoid the reload of a iCustom() if the parameters were the same as in the last call.


Markus
 
Looks like one of them loading about every 15mins. Do you have optimization on while backtesting?
 
David,

It's from the optimizer. The iCustom() ist only called on every new bar (on a 15M chart). This means in fact that it's loaded every time that it is called.


Markus