Any questions from a PROFI to a SUPER PROFI - 1. - page 12

 
TheXpert:
If you have problems removing a singleton, it's probably not being used correctly. Although singletons are also different, take Phoenix for example.
That's the end of it)
 
Singletons? Delete? Smart pointer to the rescue.
For example, my favourite shared ptr.
Although it's probably not the best way to do it for the dll.
I don't use pointers in C++.
Like memory allocation, WinAPI calls etc.
.
Or, one can create a special function like killInstance();
.
Vadim was able to recommend singletons because
itself solved the initialization problem.
There is no other way to properly initialize
global instances.
.
I looked it up on the Internet from someone else.
 
Yeah, that's what Andrew's like, I thought to myself. There's a lot of us here...
 
TheXpert:

Deadlock according to symptoms. Apparently, when starting from a remote process, the terminal does not have time to execute some procedure. Maybe the script is running from the wrong thread.

Alternatively you can run tick event instead of slip - make asynchronous script emulation, it should help.

After all my class library conversions to correct singletons, finally got back to the main project.

The problem from the first post of this thread is now solved. It was about wrong, untimely initialization of classes.

 
Zhunko:

... back to the main project...

hope to have a look at your design later, at least in the form of flowcharts or screenshots: to marvel, so to speak)))
 
alsu:
I hope to have a look at your design later, at least in the form of block diagrams or screenshots: to marvel, so to speak)))

:-)) Yes, it's nothing special. This project is also a subproject.

It's a console application which just, with the help of MT4, loads/uploads history on a timer independently from the main terminal (battle terminal).

The main function of this application is already working. What is left to do is to synthesize a non-standard TF to calculate the weighting coefficients of currency indices.

Creation of non-standard TFs and calculation of weights and replenishment of the database are carried out in additional threads regardless of quotes loading.

Console application:

1. Creates a directory - a copy of MT4 root directory in MT4.

2. Creates, if not, copies of necessary directories and files in this directory using hard and symbolic links, so as not to overflow the disk.

I.e., in fact, it works with the originals of the main MT4 files.

3. Runs MT4 from the new directory.

4. Switches tools and TFs, updating charts.

5. Closes MT4 so that it saves everything swapped into history files.

6. Waits for MT4 process to complete.

7. Starts creation of non-standard TF.

8. Starts flow with calculation and saving of weights.

9. By timer all over again.

 
would it be correct to say that the roundabouts are organised mainly for the sake of point 5?
 
alsu:
Would it be correct to say that the circumvention maneuvers are organised mainly for the sake of point 5?

All this is mainly to increase the reliability of trading in the main terminal. Pumping up all the instruments overflows the memory of MT4. It does not work reliably in this mode.

And the Expert Advisor overloaded with various service functions is not too reliable, as it turns out. We need to divide the tasks between different terminals.

Perhaps there will be a third terminal for trading.

 

Can I ask a dumb question - how do I know which of the terminal's chart windows is currently visible to the user?

;)

 
FreeLance:

Can I ask a dumb question - how do I know which of the terminal's chart windows is currently visible to the user?

;)

Go through all the chart windows and check each of them for full reversal and activity. If there is, then one of these windows is visible, if not, then all of them are visible. This is without taking into account the Z-sequence.