Errors, bugs, questions - page 2250

 
Vladimir Pastushak:

the account is the same.

I compared the processing of a trade order on a real exchange account and in the tester, running on a real exchange account. It works differently: on the real and live trade order is additionally sent to the exchange and only then can be executed or not, and in the Strategy Tester launched on the real account trade order works as in forex - immediately visible whether the trade order is executed or not.

From this we can conclude that running in the tester (not to be confused with the debugging) on a real account will always show account type ACCOUNT_TRADE_MODE_DEMO.

 
Vladimir Karputov:

I compared the processing of a trade order on a real exchange account and in the tester launched on a real exchange account. It works differently: on the real and live trade order is additionally sent to the exchange and only then can be executed or not, and in the tester, running on a real account, trade order works like a forex - immediately visible whether the trade order is executed or not.

This allows us to conclude that the tester will always show account type ACCOUNT_TRADE_MODE_DEMO in the real account (not to be confused with debugging).

Vladimir, you don't have anything to do with order execution and account type.

I'm talking about account types and methods of working on them.

Real - you can trade in real account and test Expert Advisors.

Demo - we can trade in the demo account and test EAs .

Why is the function that says that this is a demo account when I test it on the real account ?

 
Vladimir Pastushak:

Vladimir, what does this have to do with order execution and account type?

I'm talking about account types and methods of working on them.

Real - you can trade in real account and test EAs.

Demo - we can trade in the demo account and test EAs .

Why do I get the function that says demo when I test on the real account?

I thought I described it in details: running the tester in visual mode on a real account is not the same as on the real account. So the conclusion: if you run the tester in visual mode - then the account type will always beACCOUNT_TRADE_MODE_DEMO.


That's what I checked and saw.


Added: although no one is stopping anyone from requesting ServiceDesk (this thread is rarely read, anyway).

 
Vladimir Pastushak:

Question:

We are working on a demo account, all demo account data is loaded into the terminal margin, spread, lots max min, etc.

During testing AccountInfoInteger(ACCOUNT_TRADE_MODE) returns that it is a demo account

and MQLInfoInteger(MQL_TESTER) returns that the program is running in Strategy Tester.

Why connect to a real account and launching the program in strategy tester, it returns that it is a demo account?

Logically, the Demo, Real, Competition are types of accounts, and the testing is the method of working with the program on the account.

So, AccountInfoInteger(ACCOUNT_TRADE_MODE) should return the Demo, Real, Competition account type in the Strategy Tester

Code reproducing the problem

There is a dummy in the tester in this place. It always returns ACCOUNT_TRADE_MODE_DEMO

Counter question. Why do we need to know if this is a real or demo account in the Strategy Tester?

 
Slava:

In the tester, there is a stub at this point. Always returns ACCOUNT_TRADE_MODE_DEMO

Counter-question. Why do we need to know in the Strategy Tester whether this is a real or a demo account?

Creating a lock, so that the Expert Advisor would not work in the Strategy Tester on a real account.

You can only test it on demo accounts.

But this way I see that such a blocking is impossible to do...


In the tester in this place is a blank. It always returns ACCOUNT_TRADE_MODE_DEMO.

This should be added to the reference...

 
Vladimir Pastushak:

Creating a lock, so that an EA on a real account would not work in the tester.

You may only test it on demo accounts...

But this way you won't be able to create such a lock...


What for?

That doesn't seem right to me.

What about a real account, but with an investor password?

 
Artyom Trishkin:

How isprinting to the screen different from printing to the log? Do you print to the log with the wrong function, too? Is it convenient to eat soup with a hammer?

DoubleToString() with the required accuracy.

1. You don't print anything to the log.

2. In the chart, the NormalizeDouble(...,_Digits) values are output in the comments function Comment();.

3. The EURUSD chart with the accuracy of _Digits=5.

4. The values with more than 5 decimal places appear in the chart in the comments.

5. Goodbye to yourself.

 
AshimN:

1. Nothing is displayed in the logbook.

2. The NormalizeDouble(...,_Digits) values are displayed in the chart in the comments with Comment();.

3. The EURUSD chart with the accuracy of _Digits=5.

4. The values with more than 5 decimal places appear in the chart in the comments.

5. Forgive yourselves.

NOT THE FUNCTION.
 
Artyom Trishkin:
NOT THE FUNCTION.

what function?)) Do you know another function for converting to a given accuracy other than

Rounding a floating pointnumber to a given accuracy.

doubleNormalizeDouble(
doublevalue,// number to be normalized
intdigits//number of decimal places
);

?

 
AshimN:

what function?)) Do you know another function for converting to a given accuracy other than

Rounding a floating pointnumber to a given accuracy.

doubleNormalizeDouble(
doublevalue,// number to be normalized
intdigits//number of decimal places
);

?

I have already written you the name of the print function. Please read carefully what you wrote before.
Reason: