Errors, bugs, questions - page 1801
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It is simply immoral to make a complaint about demo servers, especially ones that are not backed by a broker :-)
And MQ server should be a kind of "benchmark", on which algo-developers could and should test their technologies.
Multiple SymbolSelect calls will cause the terminal to hang.
{
bool Res = false;
for (int i = SymbolsTotal(MarketWatch) - 1; (i >= 0) && (!Res); i--)
Res = (Symb == SymbolName(i, MarketWatch));
return(Res);
}
bool SymbolOnOff( const string Symb )
{
return(SymbolSelect(Symb, !SymbolExist(Symb)));
}
void OnStart()
{
for (int i = SymbolsTotal(false) - 1; i >= 0; i--)
{
const string Symb = SymbolName(i, false);
if (SymbolOnOff(Symb))
SymbolOnOff(Symb);
}
}
I did not see any mention in the Help, that if a symbol is not in the Market Watch, then there is no data on it. Had to do it by handwriting.
Returned value
Value of double type. In case of an unsuccessful execution the error information can be obtained with GetLastError():
Right. There's a mention of
Thank you, indirectly mentioned.
Tell me, if I add a symbol to Market Watch via SymbolSelect, how do I know that Bid/Ask by symbol has become available -SymbolIsSynchronized?
SymbolIsSynchronized - seems to be expensive for this purpose, because it also raises the issue of M1-history synchronization.
SymbolIsSynchronized never becomes true on some characters.
Thank you, indirectly mentioned.
Tell me, if I add a symbol to Market Watch via SymbolSelect, how do I know that Bid/Ask by symbol has become available - SymbolIsSynchronized?
SymbolIsSynchronized - seems to be expensive for this purpose, because it also raises the issue of M1-history synchronization.
SymbolIsSynchronized never becomes true on some symbols.
If this is done from the indicator, it will give exactly what is there, but with a request to the history centre for paging. Then it can be excruciating.
If it is done from Expert Advisor or script, then several cycles of requests can be made inside the function with waiting for response, and as a rule after such call history will be synchronized
If I add a symbol to Market Watch via SymbolSelect, how do I know if Bid/Ask on the symbol is available?
Immediately after SymbolSelect(true), I ask for prices and they are zero. At the same time _LastError == 0, SymbolInfoTick == true.
How do I know that prices for the new symbol for Marketwatch have been delivered to Marketwatch?
Before checking the history sync flag, you must first call CopyRates(Symbol(),PERIOD_M1,0,1000,rates)
If this is done from the indicator, it will give exactly what is there, but with a request to the history centre for paging. Then it can be excruciating.
If it's done from an EA or a script, then several request cycles can be made inside the function waiting for the answer and, as a rule, the history will be synchronized after such a call