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

 
MetaDriver:

It would be a good idea to disable swap accounting in the tester.

// So as not to offend the religious feelings of Islamic account holders.


Yeah and add leverage ....
 
VOLDEMAR:

Yeah and add leverage ....
Isn't there one?
 
it is automatically set depending on the type of account to which the terminal was last connected
 
So connect to the right account before testing, what's the problem? But the leverage is taken into account, so there's no need to add it.
 
artmedia70:

The new help says:

ArrayMaximum

Looks for the maximum element in a one-dimensional numeric array.

int ArrayMaximum(
const void& array[], // array for search
int start=0, // from which index we start the search
int count=WHOLE_ARRAY // number of the indexes being searched
);

In the editor:

In the 509th help:

Parameters:
array[] - Numeric array to search in.
count - Number of elements to search.
start - Start index for the search.


In the new help, the last two parameters are swapped.


A fix will be available in the new help.
 
Renat:


I wanted to see how the debugger worked, so I took some simple code:

int Counter = 0;

void init() {
   Counter  = Counter + 1;
   Counter  = Counter + 1;
   Counter  = Counter + 1;
   Counter  = Counter + 1;
   Counter  = Counter + 1;
 }

void start() {
   Counter  = Counter + 1;
   Counter  = Counter + 1;
   Counter  = Counter + 1;
   Counter  = Counter + 1;
   Counter  = Counter + 1;
}


Set checkpoints in init() and start(), then clicked on "Start debugging". After that F11 - it went through init() step by step to the end and stopped, but did not go into start(). With the same code in MT5 the debugger goes into start().
I wanted to know if the debugger works in MT4 beta or am I doing something wrong?
 
chief2000:

Wanted to see how the debugger works, took some simple code:


Set checkpoints in init() and start(), then clicked on "Start debugging". After that F11 - it went through init() step by step to the end and stopped, but did not go into start(). With the same code in MT5 the debugger goes into start().
I wanted to know if the debugger works in MT4 beta or am I doing something wrong?


Tried it - it goes into start() (I traced it by pressing F10). Maybe you just didn't wait for the tick to come in?
 
chief2000:

I wanted to see how the debugger works, so I took a simple code:


Set checkpoints in init() and start(), then clicked on "Start debugging". After that F11 - it went through init() step by step to the end and stopped, but did not go into start(). With the same code in MT5 the debugger goes into start().
I wanted to know if the debugger works in MT4 beta or am I doing something wrong?


Yes, the debugger worked fine (i don't know exactly now, but a week ago it was fine - i debugged my classes).

Only I didn't make any breakpoints in the init, they were all in the start.

 
evillive:
So connect to the right account before testing, what's the problem? But the leverage is taken into account, so there's no need to add it.

So let's trade manually or on history manually test strategies .... ))))
Some brokers don't give leverage like 1 to 1 or 1 to 1000 ....

 
Scriptong:

Tried it - the entry to start is in progress (traced by pressing F10). Maybe you just didn't wait for the tick to come?

Maybe.
I don't know why yet, but instead of EURUSD (I chose EURUSD in the tester) the debugger tries to open USDCHF pair chart, for which there is no historical data. Where is this set?
Reason: