SymbolIsSynchronized
이 기능은 터미널에서 선택된 심볼과 데이터가 거래 서버의 데이터와 동기화되는지 여부를 확인.
bool SymbolIsSynchronized(
string name,
);
|
매개변수
이름
[in] 심볼 이름.
값을 반환
예:
#define SYMBOL_NAME "EURUSD"
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//--- 'SYMBOL_NAME' 심볼을 사용하여 터미널의 데이터를 서버 데이터와 동기화하기 위한 플래그를 가져옵니다.
bool sync = SymbolIsSynchronized(SYMBOL_NAME);
//--- 동기화 플래그에 따라 메시지를 생성합니다.
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);
//--- 얻은 결과를 저널에 보냅니다.
Print(text);
/*
동기화된 데이터의 결과:
The data on the 'EURUSD' symbol in the terminal is synchronized with the data on the trading server.
아직 동기화되지 않은 데이터에 대한 결과:
The data for the 'GBPHKD' symbol in the terminal is not synchronized with the data on the trading server.
*/
}
|
추가 참조
SymbolInfoInteger, Organizing Data Access