After some testing,
It seem that copying like this works,
The problem appears when I pass cleft.d and cright.d members to lineEquation function => there's the problem or bug
If I copy cleft.d and cright.d to some double variables, and I pass these variables to lineEquation function => works flawlessly.
The nasty results appear only when I pass cleft.d and cright.d to lineEquation directly.
Compiler issue?
Firstly, you should know about copying of simple structures - https://www.mql5.com/en/docs/basis/types/casting#casting_structure
If it won't help please write to Servicedesk.
- www.mql5.com
Firstly, you should know about copying of simple structures - https://www.mql5.com/en/docs/basis/types/casting#casting_structure
If it won't help please write to Servicedesk.
Here is the structure:
struct TMyStruct { double d; double p[15][6]; double tabel[15][15]; };
From what I understand, this is a simple structure, and theoretically should not have a problem when copy it to a variable of the same structure.
I saw that I can print cleft.d and cright.d, and everything is fine.
The problem appears when I pass cleft.d and cright.d to lineEquation function.
The best way would be to reproduce this problem in a simple case, to prove the bug.
- www.mql5.com
I tried to duplicate the problem,
I kept the same everything I could,
But in the test script, it works fine.
I've made 2 screenshots, with the results in my real script, and with the results in test script.
I've put some explanations in comments
I drop this issue for now, as I have a temporary solution that it works (using 2 more variables as I explained above).
I've attached the archive with all 5 files.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have this situation:
But it doesn't work,
I get nasty values from functions to which I pass structure members like:
After 2 days of searching for bugs, I don't know how to copy left and right structures, to cleft and cright respectively.
Anyone help?