What on earth is going on? - page 3

 
Сергей Таболин:

Renat, thank you. But explain me a dark one, what is the difference between 2*2+2*3 in optimizer and single pass? At least give me a hint where exactly there may be a discrepancy?

I'll give you a hint.

In your mind, there is only 2*2, while in reality there is a huge market environment and a huge amount of your code. Roughly, there are at least three orders of magnitude more variables and conditions.

As long as you run around in economy mode, you won't find reasons. Just like playing the "simple coder" game. Once you've taken up programming, learn to debug.

I advise you for the third time - unprint it and see with your eyes where the discrepancies in the transactions have started.

 
Renat Fatkhullin:

I'll give you a hint.

It is only 2*2 in your mind while in reality there is a huge market environment and a huge amount of your code. Roughly, there are at least three orders of magnitude more variables and conditions.

As long as you run around in economy mode, you won't find reasons. Just like playing the "simple coder" game. Once you've taken up programming, learn how to debug.

I advise you for the third time - unprint it and see with your eyes where the discrepancies in the transactions have started.

All right, I'll unprint it. I'll take a look. But it's unlikely I'll be able to understand the reason for these discrepancies.

Especially since I have prescribed opening, maintenance and closing of positions in my own class. I have not noticed any dissonance between optimization and single pass in other EAs for a long time (I have already discussed this issue in my earlier article).

And that's why I opened this question again.

For myself, I understand it this way - work with positions is fine-tuned and does not require intervention. So the bug somewhere else. But! All other places are code from scripts for preparing, creating, training and checking the network. Everything is debugged as well.

That leaves the possibility of using an uninitialised variable. I've checked each one. Well, maybe I missed something. In which case I expect a warning from the compiler.

Or, another way is that the code is compiled in such a way that the variable is initialized later than it is called.

As you understand, I can only guess. I have no real means of detecting this error.

 
Сергей Таболин:

OK, I'll unzip it. I'll take a look. But it is unlikely that I will be able to understand the reason for these discrepancies.

Especially, since opening, maintaining and closing of positions has been implemented in my own class. I have not noticed any dissonance between optimization and single pass in other EAs for a long time (I have already discussed this issue in my earlier article).

And that's why I opened this question again.

For myself, I understand it this way - work with positions is fine-tuned and does not require intervention. So the bug somewhere else. But! All other places are code from scripts for preparing, creating, training and checking the network. Everything is debugged as well.

That leaves the possibility of using an uninitialised variable. I've checked each one. Well, maybe I missed something. In which case I expect a warning from the compiler.

Or, another way is that the code is compiled in such a way that the variable is initialized later than it is called.

As you understand, I can only guess. I have no real means to detect this error.

First, make sure that you do not use GetTickCount64(), GetTickCount() or GetMicrosecondCount() functions in the trading logic. They may cause divergence of results in the tester and optimizer.

 
Geess:

First, make sure that you do not use functions GetTickCount64(), GetTickCount() or GetMicrosecondCount() in your trading logic. They may cause divergence of results in the tester and optimizer.

I don't.

 
Сергей Таболин:
...

The way I see it is that the position work is fine-tuned and does not require intervention. So the bug is somewhere else. But all the other places are code from the scripts for preparing, creating, training and checking the network. It's all fine-tuned too.

...

Isn't this where it all went wrong?

 

" almost all data is initialised in a loop".

Guys, you can't initialise in a loop. You have to read in the loop.

 
Generally, there should be a Stack Overflow error.
 
)
 
Artyom Trishkin:

Isn't that where the problem lies?

In what way? The network is not trained on the fly in the EA. At least, not yet )).

It is trained correctly or not, it is over-trained or under-trained but the signal is the same.

If the network gives signal "buy" at bar opening when optimizing, then it should give the same signal when making a single test. And if it does not give the same signal, it is neither there nor there.

So that is where "unnecessary" positions may appear from (provided price data are equal, I hope)?

 
Сергей Таболин:

In what way? The network is not trained on the fly in the EA. At least, not yet )).

It is trained correctly or not, it is over-trained or under-trained but the signal is the same.

If, for example, during optimization it gives a signal to buy at bar opening, then it should give the same signal during a single test. And if it does not give the same signal, it is neither there nor there.

So where can "extra" positions come from (provided price data are, I hope, the same)?

Try disabling the current logic and replacing it with a normal wizard. You'll immediately see where the cat has gone wrong, in the logic or in the execution.
Reason: