Errors, bugs, questions - page 1909

 
Alexandr Bryzgalov:
That's the idea.


Thanks.

where can i read about the idea? not a word in the help

is it only for string variable?

any characters can be used in the comment?

 
Stanislav Korotky:
I see your point. The next question, why isn't OnDeinit triggered when the visual testing window is closed? How to debug something that is in the OnDeinit of the indicator and is connected with the processing of collected information of the execution process (in particular, the profiling that cannot be performed quickly and on the long history data on the online chart)?

Let's think about it.

When profiling on history, you can call OnDeinit right after the end of the data. For profiling, indicator artifacts are usually not needed.

 
Slava:

Let's think about it.

When profiling on history, it is possible to call OnDeinit immediately after the end of data. For profiling, indicator artifacts are usually not needed.

I have written a request to the SD.
 
Stanislav Korotky:
Wrote an application to the SD.
Thank you. I have already written the application myself.
 
Slava:
Thank you. I've already written the application myself.
Before writing to the SR, I checked whether there was no reply here ;-) and there wasn't one at the time. In any case, maybe some of my suggestions from the application would work.
 
Alexandr Bryzgalov:

As they say in Jeopardy - there is no such theme. corrected, it will be like this


 
An EA is selected in the tester. Every time after compiling it, the tester selects a different EA. There is an error!
 

When you press the Home key and zoom out on the chart in MT5, the graphical objects and indicator(s) move away - you can see this in the illustration by the ZigZag.


 

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

Renat Fatkhullin, 2017.05.13 17:07

That's right, you can't be driven from bottom to top, only from top to bottom. It's for safety's sake.

You can't compare with C++ - anything can be reduced to anything there.

Why does it compile?
class A {};

class B : public A
{
public:  
  int i;
};

void OnStart()
{
  A* a = new B;
  
  ((B*)a).i = 1;
  
  dynamic_cast<B*>(a).i = 1;
  
  delete a;
}
 

In general, there are three possibilities.

1. it's a bug.

2. this cast allows to cast as reinterpret_cast which is unsafe in principle. If so, you can cast any pointers to each other with the risk of getting an access exception later.

3. this cast allows to cast as dynamic_cast, but then there is a question how to distinguish dynamic and static casts and then probably all casts are made at runtime

Reason: