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

 
Igor Makanu:

option is that

the only thing left to find out is in which magazine you look at the print results, you need to look at the experts tab

Where?

I want to see in the tester.

 
Alexey Belyakov:

Where?

I want to see in the tester.

you cannot run scripts in the tester, only indicators and Expert Advisors.

Run your code changing it from a script to an Expert Advisor

 
Igor Makanu:

you cannot run scripts in the tester, only indicators and experts

Run your code changing it from a script to an Expert Advisor

I got it. It should be run as a script. Yes, it works. Thank you.

Is it not possible to run it as Expert Advisor?

 
Hello,can you tell me what a "withdrawal" means in the mt4 terminal for an open Dow Jones position minus $13.20, minimum lot size 0.01?
 
Andreskry:
Hello,can you tell me what "withdrawal" means in the mt4 terminal for an open Dow Jones position minus $13.20, minimum lot size 0.01?

Attach a screenshot - nothing is clear

 
not found in search. what doesushortfill_symbol=''// filler?


IntegerToString

Converts an integer value to a string of the specified length and returns the resulting string.

string  IntegerToString(
   long    number,              // число
   int     str_len=0,           // длина строки на выходе
   ushort  fill_symbol=' '      // заполнитель
   );
 
awsomdino:
not found in search. what doesushortfill_symbol=''// filler?


IntegerToString

Converts an integer value to a string of the specified length and returns the string.

You should learn to check such questions yourself with the code, try this:

void OnStart()
{
   Print(IntegerToString(123,10,'0'));
   Print(IntegerToString(123,10,'$'));
}

2020.06.19 17:00:31.035 tst (EURUSD,H1) 0000000123

2020.06.19 17:00:31.035 tst (EURUSD,H1) $$$$$$$123

 
Igor Makanu:

you have to learn to check such questions yourself with the code, try this:

2020.06.19 17:00:31.035 tst (EURUSD,H1) 0000000123

2020.06.19 17:00:31.035 tst (EURUSD,H1) $$$$$$$123

Well it's certainly on the fritz if the result has to be tested)))))

 
Valeriy Yastremskiy:

Well, the manual is certainly a bit cryptic, if the result is to be tested)))))

MQL help is the same as other languages

it assumes you have at least some basic experience with writing simple code

that's why the word "//filler" most people won't test it or check it, it's obvious

 

@Igor Makanu

tried it, you'd better fill it after 10 hours), who'd have thought it would fill a blank space, and more importantly for what purpose

I reread the help, and now I see that after the word:

str_len=0

[in] string length

you have to read everything else as well, I'll pay more attention.

Print(IntegerToString(dt.hour,2,'0'));

add

[in] placeholder character. The default is space.

Does it mean that here and in similar cases we can not use this field?

like

Print(IntegerToString(dt.hour,2));

(meaning the correct way to use it)

and the second parameter can be omitted

Reason: