Select a symbol in the settings

 

This one, understandably, works:

input ENUM_TIMEFRAMES Period_2   = PERIOD_CURRENT;

I'd like to find something similar for characters, this one doesn't work:

input string   Simbol_2  = SymbolName(1,true );

Searched, didn't find a solution.

There really isn't one, or did I just not find one?

 
Михаил:

This one, understandably, works:

I'd like to find something similar for symbols, this one doesn't work:

Searched, didn't find a solution.

There really isn't one, or have I just not found one?

Set the symbol straight:

input string    Simbol_2  = "USDJPY";
 
Vladimir Karputov:

Set the symbol straight:

It also works like this:

enum Enum_Symbol        {EURUSD,AUDUSD,USDJPY,GBPUSD,NZDUSD,USDCAD,AUDCAD}; // перечень самому вбивать - какой век на дворе!? Да и вдруг в окне не окажется.. Надо сверять, уточнять...
input Enum_Symbol       SIMBOL_2 =      EURUSD;  // Пара

And setting it straight is bad - it's inconvenient and hard to type it in!

The terminal must know its symbols!

Where is the flexibility then if you type everything in by hand?

You have to read the available ones from the "market overview" window!

After all, there is a list of periods!
 
Михаил:

It also works like this:

And setting it straight is bad - it's inconvenient and hard to type in by hand!

The terminal has to know its symbols!

Where is the flexibility then if you type everything in by hand?

You have to read the available ones from the "market overview" window!

After all, there is a list of periods!

The list of timeframes is specified in the terminal, whereas the list of available symbols exists on the trading server to which the terminal is connected, and changes from server to server.

 
Artyom Trishkin:

The list of timeframes is set in the terminal, while the list of available symbols exists on the trade server to which the terminal is connected and changes from server to server.

Exactly!

That's why I would like to have a list that the terminal itself would keep track of! There's always a list ready anyway!

That's what I mean.

And now what - open the list made with reserve and let's check what's there in this window and what's not... This is not a programmer question, but a user one.

And users are prudently saving meta-quotes. You can open a deal in 1 click right after installing the terminal! And there should be a ready list!

Установка платформы - Для продвинутых пользователей - Справка по MetaTrader 5
Установка платформы - Для продвинутых пользователей - Справка по MetaTrader 5
  • www.metatrader5.com
Платформа может работать под управлением операционных систем Microsoft Windows 2008/7/8/10. Также для работы необходим процессор с поддержкой SSE2 (Pentium 4/Athlon 64 или выше). Остальные требования к аппаратной части зависят от конкретных сценариев использования платформы — нагрузки от запущенных MQL5-программ, количества активных...
 
Михаил:

It also works like this:

And setting it straight is bad - it's inconvenient and hard to type in by hand!

The terminal has to know its symbols!

Where is the flexibility then if you type everything in by hand?

You have to read the available ones from the "market overview" window!

After all, there is a list of periods!

Thanks! For the tip. I searched over and over on this website and could not find any such method.

 
Михаил:

It also works like this:

And setting it straight is bad - it's inconvenient and hard to type in by hand!

The terminal has to know its symbols!

Where is the flexibility then if you type everything in by hand?

You have to read the available ones from the "market overview" window!

After all, there is a list of periods!

The problem is not that the terminal sees the symbols, but that mql can't create an enum "on the fly". It is possible to fill an array with a list of symbols from MarketWatch.

 
Alexey Viktorov:

The problem is not that the terminal sees the symbols, but that mql can't compile enum "on the fly". It is possible to fill an array with a list of symbols from MarketWatch.

Yes, it would be great to add such a feature. I hope it's not difficult)))

 
Михаил:

Yes, it would be great to add such a feature. I hope it's not difficult)))

Not complicated what? Creating an enum on the fly? Or an array filled with character names from MarketWatch? If it's an array, you have everything in your first post. Take the symbol name and stick it in the array.

 
Alexey Viktorov:

Easy to do what? Create an enum on the fly? Or an array filled with character names from MarketWatch? If it's an array, you have everything in your first post. Take the symbol name and stick it in the array.

In the definition of variables?

 
Михаил:

In the definition of variables?

We're not talking about the same thing.

    string arr[];
    int resize = 0, syTotal = SymbolsTotal(true);
    for(int i = 0; i < syTotal; i++)
     {
      string name = SymbolName(i, true);
      if(SymbolInfoInteger(name, SYMBOL_VISIBLE))
       {
        resize = ArrayResize(arr, i+1);
        arr[i] = name;
       }