Errors, bugs, questions - page 2581

 

Hello all, could you please tell me what could be wrong? When trying to assign to a function pointer the address of a function defined in another file, the compiler gives the error "pointer to thisfunction type is not supported yet".

#include <CPositionManagement.mqh>
CPositionManagement posManager;
typedef ulong(*PtrSendOrder)(double,double,string,double,double,datetime,const string,bool);
...
PtrSendOrder ptrBuyFunc=NULL;
PtrSendOrder ptrSellFunc=NULL;
ptrBuyFunc=posManager.SendBuyStop;   // pointer to this function type is not supported yet
ptrSellFunc=posManager.SendSellStop; // pointer to this function type is not supported yet

At the same time, if the same functions are defined in an mq5-file (where the assignment takes place), no problems occur. Applying to the address through context resolution operator also doesn't solve the problem (PtrSendOrderptrBuyFunc=CPositionManagement::SendBuyStop).

 
Roman:

Where do you see an argument here? There is a working discussion, there is no need to twist the meaning into a hen house with arrogant pathos.
Nobody asked you for anything. I thought you and the pointer had a solution, but you didn't.
You're the one who hasn't read the subject; it's been discussing arrays here for a long time already, and everyone knows about it very well.
And I've been leaning towards arrays for a long time. But since mql has string, why not use it directly?
It's exactly the bug in mql's string copying a pointer into it that we're discussing here.
I'll tell you more, it's not only through ushort that everything can be solved. There are many options with arrays.
But in my case I don't want to use arrays, since the code structure doesn't always make sense.
All the more so when I have mql's string, which I can work with directly, but it must work correctly.

The mql string works as intended. You want too much from it.

Of course, I know how you can use string in this case, but because of my pathos arrogance I won't say anything.

 
It makes sense for it to work correctly.
I hope the respected developers have heard the problem.
Files:
458.png  71 kb
 
Roman:
It makes sense that it should work correctly.
I hope the respected developers have heard the problem.

It works correctly.

And there is enough information in this thread to get it right.

 
Roman:
I hope the respected developers have heard the problem.

The developers are sitting there, scouring the 2581 pages of the thread for your conclusions .... without reproducible examples.... I can see it, they are crying with the whole team, their eyes hurt to re-read the whole topic and on the fragments of "your flight of fancy" they come up with on the fly possible options, what you have found there....

What reality do you inhabit? You've got a week of "how-to" posts interspersed with "fix the bug/inconsistency!" statements. , and ended up with a trivial switch to the personalities of the participants involved in the discussion with you.


Open a topic in the appropriate section and attach the source code, and do not forget to specify in the first message of the topic: it's you or ask how to solve the problem, or claim to have found a discrepancy documentation

 
I forgot to ask you.
 

The trailer contains short HTML. I'm asking the knowledgeable people to correct it, so that the highlighted line in the screenshot is under spoiler.


I searched for <details>-tag. But no matter how I tried, it does not work. I need it for custom report of single MT5 tester run.


WZZ accidentally attached wrong one. Corrected it.

Files:
 
How long will the build 1170???? last
 
fxsaber:

The trailer contains short HTML. I'm asking the knowledgeable people to correct it, so that the highlighted line in the screenshot is under spoiler.

I searched for <details>-tag. But no matter how I tried, it does not work. I need it for custom report of single MT5 tester.

Need to search for "html spoiler in table". I think there are examples.

 

This is the error that has been detected:

Unable to get order price in history, whereas other order parameters are read without problems.

The full code is in the attached file.


If you uncomment the line

int OnInit()
  {
//---
   //trade.Buy(0.1);
//---
   return(INIT_SUCCEEDED);
  }

and run the code in the tester with visualization, there will be no problems.

The autovalidator misses such a code, but the EA does not work on demo accounts.

Files:
Test_bug.mq5  6 kb