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

 
Andrei Trukhanovich:

if a new tick comes in while processing a tick, will it probably change?

You can do it 100 times.

The important thing is that when the function finishes its calculations, it will remember which data has already been recalculated.
This can be done at the beginning, then any new data will be recalculated.

There is no guarantee that a tick will not miss, but you don't need one.

 
Andrey Khatimlianskii:

There is only no guarantee of no tick skipping, but you don't need one.

If there is only one entry point - OnTick, no timer or events, then it looks like the right one.

 
 

Good afternoon, superprofi!

The task is to create batch links to agent folders. I found source program on githab (project attached) with functionality I need, it creates links properly, but I try to make several links at once in a loop and bummer.

This is what I need to get at the output (I created links by hand):

In the file FormMain.cs I try to fix the mess in the code, but I can't get the desired effect (see from line 73):

else
            {
                string argument = null;
                if (radioButton2.Checked)
                    argument = "/h";
                else if (radioButton3.Checked)
                    argument = "/j";
                else if (isFolder)
                    argument = "/d";

                bool result;
                int port = 0;
                for (int i = 0; i < 512; i++)
                {
                    port = 3000 + i;
                    //D:\Market\MT5\Tester\Agent - 127.0.0.1 - 3000\MQL5\Files    
                    //E:\Project\Coding\MQL\#MQL5\Files\UGA Manager\Files

                    //MessageBox.Show(textSource.Text, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    //MessageBox.Show(textOutput.Text, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);

                    result = MakeLink.Create(argument, 
                                             textOutput.Text + "\\" + i.ToString (),
                                             textSource.Text + "\\" + "Agent-127.0.0.1-" + port.ToString () + "\\MQL5\\Files");
                    //if (!result) MessageBox.Show("Something went wrong!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                }
                MessageBox.Show("Done!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
Files:
 
Andrey Dik:

Good afternoon, superprofi!

The task is to create batch links to agent folders. I found source program on githab (project attached) with functionality I need, it creates links properly, but I try to make several links at once in a loop and bummer.

This is what I need to get at the output (I created links manually):


Why do I need it so complicated? mklink - shel command

So, you can sketch some-script :-) on PowerShell or Python.

 
Maxim Kuznetsov:

why go to all that trouble? mklink is a shell command

You can just write a script in any script file :-) in PowerShell or Python.

of course you can, but what about the user interface for the user? how will he use the script?

 
Andrey Dik:

Sure, but a user interface for the user? How will he use the script?

man... I have a suspicion that very few people go to this part of the forum, especially in MQL4 section. I`ll create a branch in General Discussions.

 
Andrey Dik:

of course, but what about the user interface for the user? how will he use the script?

What's the problem? You may also use a script to draw the interface... instead of using a whole C# in dependencies for the sake of a single form

though, master's choice ...

 
Maxim Kuznetsov:

What's the problem? You can also use a script to draw the interface... you need a whole C# in dependencies for the sake of one form.

though, master's choice ...

if you are not a problem, please help me.
Reason: