Errors, bugs, questions - page 940

 

Good afternoon.

Can you tell me what can be done ...

Instead of C:\Program files\MT 5 ......... everythinggoes in C:\Users\Iam\AppData\Roaming\MetaQuotes\Terminal\...

Uninstalled and installed MT 5 several times - same result. All this happened after installing Windows 8.

Regards, E.Kovalev

 
erkov:

Good afternoon.

Can you tell me what can be done ...

Instead of C:\Program files\MT 5 ......... everythinggoes in C:\Users\Iam\AppData\Roaming\MetaQuotes\Terminal\...

Uninstalled and installed MT 5 several times - same result. All this happened after installing Windows 8.

Sincerely, E. Kovalev

I have the same on my desktop 7 and all the Expert Advisors, inductions, etc. are installed on it.

Apparently it is a "default".

i would also like to change it? it's not convenient to get to the folder....

 
Access violation write to 0x000000001535C1D8


this is what the script gives out, the script calls the same indicator in a loop, only the parameters change, after about 300 calls this message

at the beginning of the loop, I create a handle

call the indicator

at the end of each cycle put IndicatorRelease(...);

maybe something else needs to remove the indicator

 
vgeny:

I have the same on my 7, all EAs, inductions, etc. are placed there

this must be the "default".

I also wonder how to change it? it's not convenient to get to the folder....

Look in the built-in help of the terminal - MetaTrader 5 HelpStart Menu → Run Terminal:

Guest mode

The distinction of the guest mode of the client terminal launch is the location of its editable files separately from the unchangeable ones. This mode is activated when terminal is installed in system folder (OS folder, Program Files) and user's rights to write into it are limited.

Guest mode is also enabled in the following situations:

  • If UAC (User Account Control) is enabled.
  • If connecting to a computer remotely (Remote Desktop Protocol, RDP).

In the above situations, all modifiable terminal files, depending on the operating system used, are stored in the following directories:

Microsoft Windows XP:

  • C:\Documents and Settings\username\Application Data\MetaQuotes\Terminal\instance_id\

Microsoft Windows Vista and later:

  • C:\Users\username\Application Data\Roaming\MetaQuotes\Terminal\instance_id\

Here "C" is the letter of a logical drive where the operating system is installed, "username" is the account name in the operating system, under which the terminal has been installed, and "instance_id" is a unique identifier generated based on the path to a directory, where the terminal is installed.

For quick access to these folders, the terminal provides a special command - "Open the data directory Open data directory" located in the "File" menu.

  • In guest mode each Windows account will have different directory for storing changed terminal files.
  • To force terminal to start in main mode, start it from command line with /portable switch.
  • Detailed description of client terminal file structure and their purposes are given in the corresponding section.

If you don't want to have problems with security system - don't install terminal into/Program Files/ folder.

Read also the article A Quick Dive into MQL5


 
vgeny: before printing

k2 = NormalizeDouble(k2, 2);

In the logbook it goes like this

0.07000000000000001

and only when the coefficient is 0.07

type k2 double k2;

what can it be?

Apparently, this is exactly how this number looks after normalization. Look in the reference to the note describing the NormalizeDouble() function: what will the following line print?

Print("DoubleToString(a,8)=",DoubleToString(a,8)); // выведем с заданной точностью

Документация по MQL5: Преобразование данных / NormalizeDouble
Документация по MQL5: Преобразование данных / NormalizeDouble
  • www.mql5.com
Преобразование данных / NormalizeDouble - Документация по MQL5
 
vgeny: Access violation write to 0x000000001535C1D8

this is what the script gives out, the script calls the same indicator in a loop, only the parameters change, after about 300 calls this message

I form handle at the beginning of loop, call indicator, at the end of each loop put IndicatorRelease(...);

maybe something else needs to remove the indicator

Continuous indicator call in a loop? It's a very hard way. Here, find the beginning and read the whole topic carefully: In fact, in 99% of cases the IndicatorRelease call is a logical error of the programmer
 
vgeny:

Please advise why this happens to the loop line

for(k2 = 0.01; k2 < 0.1; k2 += 0.01)

I send the k2 coefficient to print

Print(k2);

before printing

k2 = NormalizeDouble(k2, 2);

it looks like this in the journal

0.07000000000000001

and only when the coefficient is 0.07

type k2 double k2;

what can it be?

This question has been discussed many times already.

Read it here.

 
Yedelkin:
Continuously calling the indicator in a loop? That's a very hard way to do it. Here, find the beginning and read the whole topic carefully: In fact, in 99% of cases, the IndicatorRelease call is a logical error of the programmer

ok 900 pages))

Advise another way to inspect indicator line, 10000 different variants of indicator parameter, result of each I inspect for spread etc, save result, take next parameter etc.

for example if you considered the MA, 10000 periods how would you implement this?

 
alexvd:

The issue has already been discussed many times.

Read it here.

OK, thank you for your patience and understanding)))))))
 

vgeny:

Yedelkin:
Continuously calling the indicator in a loop? That's a very hard way. Here, find the beginning and read carefully the whole topic: In fact, in 99% of cases, the IndicatorRelease call is a logical error of the programmer

ok 900 pages))

No, not 900 pages. The topic about inefficient use of IndicatorRelease() is unlikely to get more than 10 pages in the vicinity of this link. That is why I advised you to "find the beginning" of the subject. You don't have to reread the general branch "Errors, bugs, questions" for that.

vgeny : I will advise you another way to examine the indicator line, I will examine the result of each parameter, I will save the result and take the next one and so on.

I.e. you need 10 thousand indicators for analysis (10 thousand versions of one indicator with different parameters)? I think the answer to this question was already given - try to search the forum threads with keyword IndicatorRelease.

vgeny : for example if you were considering MA, 10000 periods how would you implement it?

It's hard to answer when you don't understand the meaning of using such a huge number of periods/parameters. But theoretically, I would renounce the idea of using 10 thousand standard indicators (10 thousand versions of a standard indicator with different parameters) and write my own indicator (one) that recalculates 10 thousand values on each tick and other derived parameters. And it minimizes the number of indicator buffers - you need the calculated data, not their reflection on the chart. And it must be checked if such a hybrid does all calculations within one tick. Or in a minute, if your analysis allows to make minute-by-minute recalculation instead of tick by tick.

Here's a simple example - Bollinger Bands. You can use three separate indicators - for the middle line, upper and lower. Or you can combine them all elegantly in one indicator program.

Reason: