Download MetaTrader 5

help beginners

To add comments, please log in or register
Have you made a screenshot in MetaTrader? Share it with friends!
mazi
28
mazi 2013.07.14 13:43 

I am a beginner in MQL5 coding. I need to write a code for testing a hypothesis for my research. I started very simple codes to see how can I write and test them. I appreciate if someone can help me about it.

First of all, I don't know how and where should I see the output and results.

In addition when I want to open a file or delete a file I can not and the file exists after running(for instance: I want to delete a file in common folder, and the code I wrote is as following)

void OnStart()
{
FileDelete("test.txt",0);
}

Thanks

Alain Verleyen
Moderator
30707
Alain Verleyen 2013.07.14 17:44  
mazi:

I am a beginner in MQL5 coding. I need to write a code for testing a hypothesis for my research. I started very simple codes to see how can I write and test them. I appreciate if someone can help me about it.

First of all, I don't know how and where should I see the output and results.

In addition when I want to open a file or delete a file I can not and the file exists after running(for instance: I want to delete a file in common folder, and the code I wrote is as following)

void OnStart()
{
FileDelete("test.txt",0);
}

Thanks

There are multiple outputs, first one is obviously the chart. An other important output is Experts tab in Toolbox window, you can use Print function for that. See this article about output devices.

To delete a file in the common folder for all terminals you have to use the FILE_COMMON flag.

void OnStart()
{
FileDelete("test.txt",FILE_COMMON);
}
To add comments, please log in or register