#property copyright "Copyright 2025, MetaQuotes Ltd."
#property link "https://www.mql5.com"
#property version "1.00"
#define GV_NAME "TestGlobalVariableCheck"
//+------------------------------------------------------------------+
//| 스크립트 프로그램 시작 함수 |
//+------------------------------------------------------------------+
void OnStart()
{
//--- GV_NAME이라는 클라이언트 터미널 전역 변수의 플래그를 가져옵니다.
bool exist=GlobalVariableCheck(GV_NAME);
PrintFormat("Terminal global variable named \"%s\" %s", GV_NAME, (exist ? "exists" : "does not exist"));
/*
전역 변수가 있는 경우 결과:
Terminal global variable named "TestGlobalVariableCheck" exists
전역 변수가 없는 경우의 결과:
Terminal global variable named "TestGlobalVariableCheck" does not exist
*/
}
|