Questions from Beginners MQL5 MT5 MetaTrader 5 - page 661

 
ANDREY:
Yes I have a laptop, XP operating system

On a laptop, you can do what you do on a tablet: on the dotpad, spread two fingers apart.

Added:

the help files are here: AppData\Roaming\MetaQuotes\Terminal\Help\

 
Vladimir Karputov:
Ctrl + mouse wheel inside help. The scale will zoom in.
For some reason it doesn't work....
 
Vladimir Karputov:

On a laptop, you can do what you do on a tablet: on the dotpad, spread two fingers apart.

Added:

help files are here: AppData\Roaming\MetaQuotes\Terminal\Help\

I have a ten-year-old laptop
 
ANDREY:
For some reason it doesn't work....
It works on Windows 10. Checked. It's probably down to the version of the editor that opens the chm help.
 

You need to get programmaticallythe amount of free funds needed to open 1 lot to buy in MQL5, analog of MQL4 "MarketInfo(symbf,MODE_MARGINREQUIRED);"

double min=SymbolInfoDouble(Symbol(),SYMBOL_MARGIN_INITIAL);
Print("min=",min);

I get:

2016.11.03 17:52:36.266 период (EURUSD,D1)      min=0.0


What can it be?

 
forexman77:

You need to get programmaticallythe amount of free funds needed to open 1 lot to buy in MQL5, analog of MQL4 "MarketInfo(symbf,MODE_MARGINREQUIRED);"

double min=SymbolInfoDouble(Symbol(),SYMBOL_MARGIN_INITIAL);
Print("min=",min);

I get:

2016.11.03 17:52:36.266 период (EURUSD,D1)      min=0.0


What can it be?

https://www.mql5.com/ru/forum/36370
Почему SymbolInfoDouble(_Symbol,SYMBOL_MARGIN_INITIAL) дает 0 (нуль)?
Почему SymbolInfoDouble(_Symbol,SYMBOL_MARGIN_INITIAL) дает 0 (нуль)?
  • www.mql5.com
SymbolInfoDouble(_Symbol,SYMBOL_MARGIN_INITIAL);и поддерживающей маржи за 1 лот.
 
Well, I can read too) Will it work in tester and even more so in optimization? It definitely doesn't work in the script, the author writes that it should be placed in the ontik, in the script it returns 1.0.
 
forexman77:

You need to get programmaticallythe amount of free funds needed to open 1 lot to buy in MQL5, analog of MQL4 "MarketInfo(symbf,MODE_MARGINREQUIRED);"

double min=SymbolInfoDouble(Symbol(),SYMBOL_MARGIN_INITIAL);
Print("min=",min);

I get:

2016.11.03 17:52:36.266 период (EURUSD,D1)      min=0.0


What can it be?

Unfortunately, MQL5 has no analogue of theMarketInfo(symbf,MODE_MARGINREQUIRED) property, but I don't remember exactly, this topic was already discussed in the forum somewhere
 
forexman77:
Well, I can read too) Will it work in tester and even more so in optimization? It definitely doesn't work in the script, the author writes that it should be placed in the ontik, in the script it returns 1.0.

What was required.

Here only to read, no more.

 

Thank you! Carefully read it again) It worked and even in the script

2016.11.03 18:28:38.553 период (EURUSD,D1)      margin_sell=221.77
2016.11.03 18:28:38.553 период (EURUSD,D1)      margin_buy=221.78
Reason: