SymbolIsSynchronized
Verifica se os dados do símbolo especificado no terminal estão sincronizados com os dados no servidor de negociação.
bool SymbolIsSynchronized( string name, ); |
Parâmetros
name
[in] Nome do ativo.
Valor de retorno
Exemplo:
#define SYMBOL_NAME "EURUSD" //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- obtemos o sinalizador de sincronização dos dados no terminal para o símbolo 'SYMBOL_NAME' com os dados no servidor bool sync = SymbolIsSynchronized(SYMBOL_NAME); //--- criamos uma mensagem dependendo do sinalizador de sincronização string text = StringFormat("The data on the '%s' symbol in the terminal is synchronized with the data on the trading server.", SYMBOL_NAME); if(!sync) text = StringFormat("The data for the '%s' symbol in the terminal is not synchronized with the data on the trading server.", SYMBOL_NAME); //--- exibimos o resultado obtido no log Print(text); /* resultado para dados sincronizados: The data on the 'EURUSD' symbol in the terminal is synchronized with the data on the trading server. resultado para dados ainda não sincronizados: The data for the 'GBPHKD' symbol in the terminal is not synchronized with the data on the trading server. */ } |
Também Veja
SymbolInfoInteger, Organizando Acesso a Dados