[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 621

 
artmedia70:
And you put an indicator on the test chart before you start testing

You can put indicators in the window and save the template as tester.tpl

Then this template will be loaded each time the visualizer is opened.

 

Anybody experienced error "Invalid account" in terminal auto-login (2012.03.08 10:21:04 '1470856': connect failed [ Invalid account ])? Checks to remember the password and autoconfiguration set, terminal logs on startup normally, ticks are received, chart is updated, but after a while I go to the computer and there is the same thing :(

I couldn't get to know anything, I blamed my ISP. I don't have such problems with terminals of other brokerage companies. I also don't have any problems with connection via fiber, no lags or interruptions. I don't use P2P either.

I suspect that if I'm disconnected from default server the terminal scans servers and tries to connect to other servers in list, as a result server sometimes denies login, what I failed to reproduce manually (when choosing another DC server first "no connection" or "general error", or even "Invalid account", then when trying to rescan servers - most often "Invalid account" :-\)

How can one recognize this from an Expert Advisor? After all, when the error "Invalid account" to rescan the server is no longer possible, only a re-login or restart of the terminal, but manually, but how to automate? Would the "Reconnect" script of the Composter help? If so, how do I put it in the Expert Advisor to restart the terminal in the event of "Invalid account", "no connection" or "general error", preferably only the one with the error, without affecting the others, working in parallel with it?

Z.I. The script was helpful, but will it work if I embed it in the EA as it is?

 
alsu:

You can put indicators in the window and save the template under the name tester.tpl

Then every time you open the visualizer, this template will be loaded.


Thank you, I saved the template, that helped.
 
Hello! Please help me, how can I make an EA in the tester, if it can no longer trade (not enough margin to open) immediately end the test? I have it hanging for a long time, giving a million times the error that the margin is not enough. Of course it's not an option...
 
Batmannk:
Hello! Please help me, how can I make an EA in the tester terminate the test if it cannot trade anymore (not enough margin for opening)? I have it hanging for a long time, giving a million times the error that the margin is not enough. Of course it's not an option...


In function init() must be added checking for lack of funds for further trading and in case of shortage call function deinit().

For example:

 init()   
{     
  double lotcost = MarketInfo(Symbol(),MODE_MARGINREQUIRED);// Стоимость 1 лота
  if(AccountFreeMargin()<lotcost) deinit(); 
}

The Expert Advisor would at least stop sending meaningless requests to open an order to the server, although it would not unload itself from the memory.

The test can probably be stopped completely only somehow using WinAPI, by passing codes of calling the tester subwindow and pressing the Stop button. Real-time operation of the Expert Advisor can also be forbidden through WinAPI, by programmatically releasing the "Expert Advisors" button on the toolbar. I am interested in how exactly it can be done by a simple example :)

 
evillive:


In function init(), check for lack of funds for further trading and in case of shortage call function deinit().

For example:

The Expert Advisor would at least stop sending meaningless requests to open an order to the server, although it would not unload itself from the memory.

The test can probably be stopped completely only somehow using WinAPI, by passing codes of calling the tester subwindow and pressing the Stop button. Real-time operation of the Expert Advisor can also be forbidden through WinAPI, by programmatically releasing the "Expert Advisors" button on the toolbar. I am interested in how exactly it can be done by a simple example :)


Checked it out. Unfortunately it didn't work... The most amazing thing is that it keeps sending opening requests!!! Of course there's also the question, what should the deinit function be?)
 

Questions again)

Displayed the time display for iTime periods D1 and H1 (I'm investigating the incorrect operation of the indicator in this way)

It turned out that it did not coincide with the time of the tester, where I do the main runs. In the tester it was October 2010. And when I rewind quotes, the time was 00:00 for D1

and 13:00 for H1 remained unchanged. Why was it like that?

And the second question. I have displayed the maximal and the minimal values of the histogram,

The minimum one is displayed correctly, the maximum one is shown as number 2147483647. Offset

in the search by 1,2... of an array element did not succeed. How to correct the situation?

 
Fox_RM:

Again, questions)


And the second question. Displayed the maximum and minimum values of the histogram,

The minimum is displayed correctly, the maximum as a number 2147483647.


https://www.mql4.com/ru/search#!keyword=2147483647
 
Vinin:

https://www.mql4.com/ru/search#!keyword=2147483647
Got it, thanks! What's the problem with the time, can you tell me?
 
kuk:
Can you suggest a good advisor?
Good EAs are paid ones, written by professionals
Reason: