Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1242

 
Artyom Trishkin:

For MQL4 use iMAOnArray(), for MQL5 - when creating an iMA handle specify the handle of previously created ATR, not the price at which the moving average is calculated

Thanks for the tip, but I still don't understand how to write these indicators, I have no problems with them separately. Could you write how to useiMAOnArray() for ATR and MA as an example?

 
Denis Diakonov:

60-80-90 mistakes.

This number of errors is often due to a single spelling mistake (missing a semicolon or parenthesis). See near the location of the very first error.

 
Aleksei Stepanenko:

This number of errors is often due to a single spelling mistake (missing a semicolon or parenthesis). Look near the place of the very first error.

Syntax))) Actually, there is something to it)

 
Valeriy Yastremskiy:

Syntax)))

Right, syntax, that's right.

 

Guys, how do you open a text file programmatically via notepad.exe?

To open a text file editor?

 
Vladimir Pastushak:

Guys, how do you open a text file programmatically via notepad.exe?

To open a text file editor?

Search the forum and the internet for ShellExecuteW

don't remember how to tell notepad the file name, you can also run pure notepad

#import "shell32.dll"
int ShellExecuteW(int hWnd, int lpVerb, string lpFile, int lpParameters, int lpDirectory, int nCmdShow);
#import
#define  SW_SHOW 5
//+------------------------------------------------------------------+
void OnStart()
{
   ShellExecuteW(NULL, 0, "notepad.exe", 0, 0, SW_SHOW);
}
//+------------------------------------------------------------------+
 
Igor Makanu:

search the forum and the internet for ShellExecuteW

I can't remember how to pass a filename into Notepad, so you can run pure Notepad

That's exactly what I don't remember, search doesn't help...

 

If you run from cmd

notepad.exe C:\1.txt

it works, but not in ShellExecuteW. The number and direction of slashes has no effect.

 
Aleksei Stepanenko:

If you run from cmd

it works, but not in ShellExecuteW. The number and direction of slashes has no effect.

Can I run the batch in ShellExecuteW?
 
Vladimir Simakov:

It has nothing to do with mql.

https://docs.microsoft.com/en-us/windows/win32/apiindex/windows-api-list

Good luck.

Just the release of the mentioned folder said that this library gets rid of the need to connect WinApi via dll. But they forgot to add the documentation.

Reason: