Set Up DAS Trader Pro for Advanced Hotkey Scripts
Understand the runtime, name your windows, and inspect before acting.
What you are learning
A hotkey is an entry point. The script is the work it performs. A Hot Button can start the same kind of work from a window. Advanced Script adds variables, expressions, conditions and objects to the traditional command layer. It runs inside DAS Trader Pro; a script is not an external Python or JavaScript program.
This series teaches you to inspect inputs, explain a state change, and verify its result. FennEdge provides the learning material; these pages do not connect to a broker or execute DAS code.
Prepare a reproducible workspace
- Record the exact DAS build, broker connection and simulator account. Save a copy of your desktop and hotkey configuration before editing.
- In the June 2025 guide, Setup → Other Configuration → Hotkey Advanced Script enables the scripting layer. Labels may differ in your build; check its help.
- Open a Montage, Chart, Orders and Positions window. Give the Montage the unique name
feMontagethrough its title-bar menu and save the desktop. - Create a separate practice hotkey through Setup → Hotkeys/Scripts → Hotkeys. Keep it away from existing execution bindings.
First script: inspect an object
Advanced Script · inspection · no order submission. Requires the named Montage to exist.
$feWindow = GetWindowObj("feMontage");
$feWindow.ShowObject();
The first line obtains a window object. The second opens its inspection view. Compare the exposed properties with the actual window. A property name is useful only together with its meaning, access mode and context.
Lab: keep evidence
Save the script text, build number, window name, expected result and observed result. Repeat after moving focus to the Chart. This establishes a named target before introducing commands that depend on focus. A passing inspection exercise says nothing about order permissions.
Build a four-layer execution model
Read a keypress as entry point → script evaluation → DAS window or object → external system. A Hotkey, Hot Button, Alert callback or Timer can be an entry point, with different context and repetition. A correct calculation establishes the second layer; a changed window establishes a local effect; acceptance, fills and locate results require separate external evidence.
| Layer | Observation in this lesson | Common false inference |
|---|---|---|
| Entry | Trigger once manually and record the binding | A Timer runs the same body only once |
| Evaluation | Fixed inputs and a message | A message proves execution success at the broker |
| Window / object | Compare ShowObject with the visible window | The same name always resolves the original object |
| External system | Reconcile reports in later lessons | Reaching the next statement proves completion |
Organize practice files
Keep a recoverable original configuration and name practice bindings with FE_Practice_. This is a human convention, not a private namespace supplied by DAS. Give an exercise one entry point first, start with fixed data, add market data later, and introduce event entry points last.
Record script revision, DAS build, account, environment, window names, entry point, inputs, expected and observed results, and cleanup. Never put passwords in the record. Recheck names after a desktop restore; saving a desktop does not establish persistence of every runtime variable.
Exercise and worked answer
Rename feMontage. Why can the original script no longer be treated as a successful check? Answer: its lookup dependency has changed. Repair the name and inspect the observed behavior. Do not invent a null check for an unverified missing-object contract.
Trigger the same read from Chart focus. A consistent named-object result establishes that explicit lookup in this test; it does not prove that a subsequent bare Price= targets the same window. The next lesson separates variables, fields and functions.