[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 251

 
nothing
 
paladin80:

In general, return(0) stops the int start() function and waits for the next tick. If there is no digit or it is -1, what happens in int start()?



Same thing.
 
paladin80:

In general, return(0) stops the int start() function and waits for the next tick. If there is no digit or -1, what happens in int start()?

Specifically for start() it doesn't matter, because the returned value is not handled in ANY way. Nobody forbids and it would be more logical to declare start() this way:

void start()
{
    //---- Прерывание (выход из функции до следующего тика)
    return;
}
The return value of a custom function can be handled as the result of calculations, or, for example, as a "switch": 0 - OFF, 1 - ON.
 
Please advise how to make a lock on three pairs, for example EURUSD EURGBP GBRUSD, how and by what percentage of the lot to enter to get a lock?
 
gyfto:

I don't understand.

Ran it three times with this code:

It's reflected in the log:

In the first case we have a pointer to the first element of the MqlStr.string structure field, in the second case we have a pointer to the first element of the string (LPCSTR still the sameconst char*). We see different addresses. W-why? It turns out that the string as an array char and the string as an internal structure of its representation in MQL4 have different addresses? Or it means that "string structure" described in ExpertSample as internal format is artificial, and its internal format in MQL4 is lpsz? Or maybe I have simply misinterpreted the first code?

Have you read MQL4 Reference? MQL4-string is the same as c-string with null-terminator.

The structure is designed only to organize an array of strings. It's a pure Metaquotes' invention to ease the creation of string arrays.

 
TarasBY:
First, you calculate the current profit on all open orders, then you compare it with the declared level: if it is higher, you delete all orders. This procedure (and not only) is done by this EA (there is a code too).

I looked throughthis EA, I do not understand anything, it is too complicated for me, everything is locked in libraries, I do not know how to get into it, the question remains open, please copy or poke here a piece of code where the current profit of all open orders are calculated and all orders are deleted when the declared profit is achieved
 
 Graall:

I looked atthis EA, I don't understand anything, it's too complicated for me, everything is locked in libraries, I don't know how to get into it, the question remains open, please copy or paste here a piece of code with current profit calculation for all open orders and deleting all orders after reaching the declared profit

You could try ithere...
 
hoz:


Boris, a while ago you were telling me why do you need indicators, I'm not using them at all. :) But you're studying the zig-zag. You see, it's not about how you use them, it's about understanding what you use.

One man's turkey is a help and another man's is not. A turkey is just a tool. How to use it is another matter.


Victor, I was referring to the oscilloscopes in the individual windows that supposedly indicate entry points. At best, they indicate that the train has already left.

I put some of them on the chart for information without using them in my EA.

 
 

I know my question may look silly when I ask questions about writing codes, etc. As a girl I decided to experiment and trade on my own without any knowledge, without any advice. I accidentally opened an order EUSZAR through my phone, this African dollar does not want to fall, and a swap is already a lot of money, I do not have the strength to re-read the entire forum and the topic (although I understand that I should).

So:

is it possible to withdraw money from the account if there are unclosed orders in the negative? will not be removed when transferring the money these "minuses" or only swaps? somewhere on the site I read that the money can be transferred when orders are not closed, but must remain some amount, from what calculations take this amount? how to close then at all this account?

Help a girl, please))))))))