#define SYMBOL_NAME "EURUSD"
//+------------------------------------------------------------------+
//| スクリプトプログラム開始関数 |
//+------------------------------------------------------------------+
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.
*/
}
|