MetaEditor. Problems and solutions. - page 6

 
1
Liric86 2011.02.27 14:15 2011.02.27 14:15:10

Hello! After I installed MQL5 I have encountered some defects in displaying program texts during editing. When I select the cursor, the position of text changes, new characters appear on the keyboard not at the cursor position. Reinstalling the software does not help. How can I fix the problem?



 
Can you tell me if it is possible to use the order book in trading (EA)?
 
Liric86:

1
Liric86 2011.02.27 14:15 2011.02.27 14:15:10

Hello! After I installed MQL5 I have encountered some defects in displaying program texts during editing. When I select the cursor, the position of text changes, new characters appear on the keyboard not at the cursor position. Reinstalling the software does not help. How can the problem be resolved?

The font you have selected is not mono-white.

Please change your font setting to Courier New with a 10 point font size.

 
todem:
Can you tell me if you can use the order book in trading (by EA)?

You can, but not in the trading strategy tester.

At the moment there are few (there is Alpari in test mode) offering forex stacks.

 
What is missing in the debugger is a step counter. And a preset parameter to make the first break at a given step.
 
Urain:
What is missing in the debugger is a step counter. And a preset parameter to make the first break at a given step.

Breaks are currently unconditional, but it is possible to bypass this limitation using DebugBreak()
Документация по MQL5: Общие функции / DebugBreak
Документация по MQL5: Общие функции / DebugBreak
  • www.mql5.com
Общие функции / DebugBreak - Документация по MQL5
 
mql5:
Breaks are currently unconditional but we may get around this limitation using DebugBreak().

All that is so, but I faced a situation when there are many calls of one universal class described on a file to be linked. And different conditions cause calls to non-existing array cells of this class. The program itself contains thousands of algorithm steps so it is very difficult to track at which step a failure occurs using DebugBreak()+F11.

Of course, I got out of the situation the old-fashioned way (with prints and logic guesswork). But the cost of this, many hours of work. The main problem was not in what function gave an error, but in what function fails to correctly calculate the value which then leads to an error in another function. That is, we didn't need the error point itself, but knowledge of what was happening right before it.

That's why we need an inline tracer by steps and possibility to go to the specified step immediately after a new start (having rewound all previous ones).

 
I was referring to a design like this:

if(step==123124) DebugBreak();
 
mql5:

I meant such construction:

if(step==123124) DebugBreak();


Yeah, that's what I'm talking about too. Cramming it onto every line of 5,000 lines of code is a problem. And intermediate localization did not work because reference is constantly jumping between inludes, so first roughly estimate for more accurate localization was not possible.

I described this overload at the beginning of the file:

ulong cntDebugBreak=0;
void DebugBreak(ulong step)
  {
   if(step>=cntDebugBreak){cntDebugBreak++;DebugBreak();}
   else cntDebugBreak++;
  }

but if calling it invisibly (in debugger), before each expression would be very cool.

PS corrected the code.

 

MetaEditor 4 had an ingenious solution for placing the help window in the tool window, the help was always at hand right in the text editing window. Could the help window also be placed in MetaEditor 5?