Errors, bugs, questions - page 2814

 
Error during execution:
template<typename T>
int f( T, int i = sizeof(T)) { return i; }
void OnStart()
{
    Print( f(1) );
}

Result: 0

Expected result: 4

 
Fast235:

my app isn't responding at all, must not be friendly with ryzens

and the software is telling you to look at PowerManager, try changing the minimum CPU state, usually it's 5%, change it to 99-100%

Done.


and in what operating mode do you have such a redness, if in the tester, then maybe so should be, I did not go into the work of this program, I remember that the microfreeze with it look

If you want MT to work, maybe you need to change the minimum CPU frequency, so it would not jerk; it will not consume more at idle time

You can see the redness in any mode.

 
fxsaber:

Done.

Redness is observed in all modes.

sfc /scannow (system file scan command)

malwarebytes (free version will do, looks for anything harmful)

 
I cannot understand why the EA does not close trades. There are 2 signals, say 40 and 20. I put 30 to open and leave 10 to close. In theory, when one of the indicators changes its movement, there is a signal to close, but the deal still continues to work. How to fix it?
 
Valentin Denisov:
I cannot understand why the Expert Advisor does not close trades. I have 2 signals, for example, 40 and 20. I set the signal to open at 30 and close at 10. In theory, when one of the indicators changes its movement, there is a signal to close, but the deal continues to work anyway. How to fix it?

Nothing is clear. What signals? What 40?

 
Vladimir Karputov:

Nothing is clear. What signals? What 40?

There are signals thresholdopen and thresholdclose, by default they are 10. From the signals of the indicators come the patterns. Suppose there are 2 indicators with patterns 20 and 40. After calculation of these patterns we get 30 or 10. And according to the documentation, if we set open 30 and close 10, then as soon as one of the indicators turns over, the deal should be closed automatically. But this does not happen. Trades are closed and opened only when both indicators are reversed, i.e. at - 30 and +30.
 
Valentin Denisov:
There are signals thresholdopen and thresholdclose, they are 10 by default. Patterns are coming from indicator signals. Suppose there are 2 indicators with patterns 20 and 40. After calculation of these patterns we get 30 or 10. And according to the documentation, if we set open 30 and close 10, then as soon as one of the indicators turns over, the deal should be closed automatically. But this does not happen. Trades are closed and opened only when both indicators are reversed, i.e. at - 30 and +30.

There's no 'let's say'. Form an EA in the MQL5 Wizard. Attach it to your post and only then will you talk. So far, you don't have a clear understanding of how Expert Advisors based on signals of custom indicators work.

By the way, have you read the articleMQL5 Wizard: The New Version? Have you understood the picture from the article

Have you understood how it works?

Мастер MQL5: Новая версия
Мастер MQL5: Новая версия
  • www.mql5.com
В терминал MetaTrader 5 продолжают вноситься улучшения, добавляется новый функционал. В очередном (439) билде MetaTrader 5 обновился и Мастер MQL5, который позволяет создавать советники с еще более гибкими торговыми правилами. В этой статье мы покажем новые возможности Мастера MQL5 и расскажем об изменениях в архитектуре экспертов, получаемых...
 
Vladimir Karputov:

There's no 'let's say'. Form an EA in the MQL5 Wizard. Attach it to your post and only then will you talk. So far, you don't have a clear understanding of how Expert Advisors based on signals of custom indicators work.

By the way, have you read the articleMQL5 Wizard: The New Version? Have you understood the picture from the article

Have you understood how it works?

That's the thing, I have it figured out. But it doesn't work properly. I have to use crutches, I wish I didn't have to.
If we set open more than close, the trade will be executed when it is open more than close, and will close when it is between open and close. If close is greater than close, then the position will be opened when the signal is greater than open or close, and closed when it is greater than close.
 
Valentin Denisov:
The point is that I have it figured out. But it does not work as it should be. I have to use crutches because I want it to work without them.
If open is set higher than close, the trade will open when the signal is higher than open and close when between open and close. If close is larger, then the position will open when the signal is larger than open or close, and close when it is larger than close.
But this rule does not work. And I don't understand why.
 
Valentin Denisov:

"Crutches", "bug" - the lexicon of those who swim in the subject and try to pass off their mistakes as errors of the terminal.

Please form an EA in MQL5 Wizard. Attach it to your post and only then will talk.