DAS Desktop Bootstrap and Window Orchestration
Separate configuration initialization from quote readiness and window focus.
Startup is not data readiness
Prerequisite: named windows and timers. Desktop Load Script runs on startup according to the reviewed guide. Saved layouts can restore names, but a restored window is not evidence that its quote subscription is ready. Use startup to create configuration and disabled state; enable observers only after checking their dependencies.
A configuration-only bootstrap
$feSession = NewUserObj();
$feSession.schema = 1;
$feSession.enabled = 0;
$feSession.montageName = "feMontage";
$feSession.chartName = "feChart";
$feSession.lastObservation = 0;
$feSession.status = "Dependencies not checked";
Name, title, ticker and focus
A window name is your configured lookup identifier. GetWindowTitle returns its visible title; GetTicker returns its current symbol. FocusWindow moves focus and changes the target of context-dependent commands. Saving a name does not freeze the symbol or account displayed inside the window. Prefer named object reads for data and use explicit focus only when a command requires it.
A manual dependency inspection
$feTarget = GetWindowObj($feSession.montageName);
MsgBox($feTarget.GetWindowTitle(), $feTarget.GetTicker());
FocusWindow feChart;
MsgBox("Chart context selected for the next manual exercise");
Command families and side effects
The guide lists NewWindow, DuplicateWindow, Wpos, Wsize, TitleBar, LinkTo, Unlink, SaveDesktop and layout commands. Window duplication is not script-state duplication; linking windows can make a symbol change propagate. SaveLayout is documented as overwriting the current layout, so save a recoverable copy before experimenting. StopChartUpdate/ResumeChartUpdate and StopLevel2/ResumeLevel2 affect observation flows; a frozen display must not be interpreted as a fresh unchanged market.
Exercise and worked answer
Design a restart sequence for a chart observer. Answer: restore layout; initialize enabled=0; verify named windows; check ticker, interval and study; verify data readiness; reset old observation state; enable. Shutdown reverses the dependency order: disable callbacks before clearing records or closing windows. A fixed Wait is not a substitute for the readiness check.