Errors, bugs, questions - page 2750

 
fxsaber:

I'm sorry, I don't formulate it well.

I was most confused by your initial emphasis on strings, even though it's about the function.

If the test had been done with the function cache, it would have been much clearer

 
Sergey Dzyublik:

As a possible solution to the problem, the developers suggest introducing a predefined variable:

And why should two consecutive calls at an interval give the same result?

void f()
{
   MqlTick tick1, tick2; 
   SymbolInfoTick(Symbol(),tick1); //1
   /*вычисления*/
   SymbolInfoTick(Symbol(),tick2); //2
}
const MqlTick _Tick;
void f()
{
   MqlTick tick1, tick2; 
   tick1 = _Tick; //1
   /*вычисления*/
   tick2 = _Tick; //2
}
 
A100:

And why should two consecutive calls at an interval give the same result?

They shouldn't. But for a test on a native character, it's fine.
 
A100:

And why should two consecutive calls at an interval give the same result?

Because we are only talking about Tester without using Sleep- 99% of EAs.

I can't say anything about arbitrary Tester delays, as I've never seen this mode to be useful.

 
fxsaber:

I can't say anything about the tester's arbitrary delays, as I've never seen this mode to be useful.

I only used it to debug the functions of working with orders

It is quite handy to see how much the tester's chart will change its slope, i.e. how much the trading logic of working with market orders "lags"

 
Sergey Dzyublik:

A defect in ME debugger(build 2370) - after abreakpointis triggered, instead of continuing code execution by pressing (F5), the samebreakpointis actually triggered againwithout executing any code.

Replay steps:
1) Manually set
the breakpoint for both lines " arr.Add()";
2) Start debugging (F5);
3) Use PCM to open the <Generic\ArrayList.mqh> nested file in a new tab.
4) Find the line "if(m_size==ArraySize(m_items))" in the function "bool CArrayList::Add(T item)" and setthe breakpoint manually.
5) While in the "
ArrayList.mqh"tab, continue executing the code (F5).

This will
trigger the samebreakpoint as before without any actual code execution.

Thanks for the message.

Corrected by

 
fxsaber:

Because we are only talking about the Tester without using Sleep- 99% of EAs.

I can't say anything about arbitrary Tester delays, as I've never seen this mode to be useful.

Without fundamentally changing anything, it's easier to make (which in fact is the case) that recording:

SymbolInfoTick( NULL, tick ); //1

would mean

SymbolInfoTick( Symbol(), tick ); //2

at least there is no question about copying strings

 
A100:

Without fundamentally changing anything, it is easier to make (which in fact it is) that the entry

would mean

at least the question of copying lines disappears

it's not what he's asking for. He needs the fastest access to MqlTick structure on every tick.

it's kind of a paradox that there is access to _Symbol .... but you don't have access to

const MqlTick _Tick; // Текущий _Symbol-тик.

although the MQL language is positioned as the language for development of trading strategies.... I don't know what kind of TS there is if you don't know the current prices on the current tick

 
Igor Makanu:

it asks for something else in the end, it needs the fastest possible access to the MqlTick structure on every tick

And what's wrong with

SymbolInfoTick( NULL, tick ); //1

is not good enough? Show me where the bottleneck is? If it's slow too, then the Developers have a way to inline/optimize such a call - without any fundamental changes

 
A100:

What's not to like

is not good enough? If it's slow too, then the Developers have a way to inline/optimize such a call

yes it is slow, at least in the tester, I write so in the testerhttps://www.mql5.com/ru/forum/1111/page2749#comment_16487642

with a large number of optimizer passes there is a gain


I don't know how to explain, I don't know how to explain elementary things...

how do you write EAs? - You compile a library in procedural or OOP style, each function is fully transferable to another project, and to ensure this you write Bid, Ask everywhere - my example. Then you assemble a trading strategy out of the blanks. What developers offer now - write SymbolInfoDouble() everywhere

Reason: