One of my brokers changed the name of one symbol from EURRUR to EURRUB and everything-the expert Advisor is suspended.
If the expert Advisor implements chart analysis using ChartSymbol() and this function encounters a chart with an unknown symbol, then:
the expert begins to behave unpredictably. At least the function doesn’t give away the name of the chart symbol. With all the consequences.
In addition, a significant part of the symbol names do not match for different brokers. If the terminal is configured for one broker, and then there is a switch to another broker, then again we are in the pipe.
Maybe there is a way around this point programmatically? Please tell me.
tecciztecatl
you need to check for a symbol and / or select a symbol to work with,
if it did not work, then there is no such tool
SymbolInfoInteger(sym,SYMBOL_SELECT);
SymbolSelect(sym,true);
user_mt5
Do you want me to describe in words a solution that I don’t have? and for which search this branch is started?
I’m correcting you.
1. According to my observations, each broker sculpts the symbols that he takes into his head. No system is visible here, except on the main currency pairs.
2. Even if the system existed, it doesn’t solve anything. After all, each broker has its own set of symbols. For example, the AA broker offers the possibility of working with WTI. And the BB broker does not have such a symbol in the list. Now imagine that You have worked with AA in the window of this symbol. Ie MT5 is a living window with this symbol. Then you switch to the BB broker account. And Your expert begins to examine the Windows for symbols (in which you will need to display something). In the process of searching, he stumbles upon an unknown symbol and … falls into a stupor. If the ChartSymbol() function gave some -1 in case of failure, it would be clear – someone else’s character. Then just-stepped over and went on. But it hangs.
I don’t know how to do it yet. If the terminal has a window with a foreign symbol, then you need to know its symbol to make a decision. And this is just not working.
fxsaber
Forum on trading, automated trading systems and testing of trading strategies
Features of the mql5 language, subtleties and techniques
fxsaber, 2017.11.30 09:48
Memo
Use the highlighted one.
rosomah
The name of the first six letters of the symbol is always the same, it is international(correct me if wrong). Work on them.
starij
Describe the solution in words – it will be possible to solve it programmatically