Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 112

 
artmedia70:
Isn't it supposed to be the same? ;)
Undoubtedly. After all, we need to find the last open order, close it profitably. And, at the moment it does not find anything. Since the condition of the function is not fulfilled, although at the same moment in fact there are last orders closed profitably.
 
SergMich:
Afternoon to all traders. This question may have already been discussed but some EAs from codebase are not compiling in new builds, the compiler swears it is a decompiled version. But this seems to be nonsense, versions have never been decompiled

Yes, there are already a couple of threads open:

Problem during EA compilation

Help [...decompiled indicators in mq4... don't run

Not creating the ex4 file

 
pu6ka Thank you, but none of them say anything about how to deal with the code that is in the codebase and doesn't compile
 
SergMich:
pu6ka Thank you, but none of them says anything about how to deal with code that is in the codebase and does not compile
The code has an author - ask him to correct your code in the codebase.
 
hoz:
No doubt about it. I mean, we need to find the last order open, close it profitably. At the moment we do not find anything. Since the condition of the function is not fulfilled, although at the same time there are actually the last order closed profitably.


open order closed profitably

What have you been smoking?

 
hoz:
Undoubtedly. After all, we need to find the last order opened, close it profitably. But, at the moment, it does not find anything. Since the condition of the function is not fulfilled, although at the same time there are actually last orders closed profitably.

You can't do it like that:

MathAbs(OrderProfit() - OrderClosePrice())

Profit is in apples and the rate can be the ratio of banana to peanuts.

(In other words, the profit is in the deposit currency and the closing price is in pips.)

 
alsu:

You can't do it like that:

Profit is in apples and the rate can be the ratio of banana to peanuts.

(In other words, the profit is in the deposit currency and the closing price is in pips)

By the way... there should be OrderTakeProfit()
 
pako:


open order closed profitably

Have you been smoking?

Nope. Please don't read between the lines. It is written the last order was opened and closed profitably. I.e., an order that was opened from the last order (roughly speaking, up to the present moment or current bar) and closed in profit. Everybody understood me until now...

And this is a nice picture!))

 
artmedia70:
By the way, yes... there should be OrderTakeProfit()


Actually, yes. Maybe it's late, but I don't get it. That's essentially the profit in pps. is the distance from opening to closing. Why then is the expression wrong?

MathAbs(OrderClosePrice() - OrderOpenPrice())
 
hoz:


Output then 100 * point = 100 * 0.00001 = 0.001pp (if for five digits)

The value of lBUY has been changed above. Therefore, as I see it, the condition:

Will not be met. And accordingly, the value of lBUY will remain the same.

My price consists of 5 digits. Example : 1.3221.

If 100 * point = 100 * 0.0001 = 0.01 (0.01 - This is what the TS log says)

if(lBUY==0.01) или if(lBUY==0.0100)
Все равно будет выполняться...Вопрос , почему ?Видь не должно как бы.
Reason: