FennEdge Learn · Programming

DAS Trader Advanced Hotkey Script Course

Understand the code. Inspect the state. Verify the outcome. A detailed path through Advanced Script: language, data structures, order objects, event workflows and complete practice projects.

Plan about 1046 minutes including reading, worked examples, and each lesson exercise; actual time varies.

36Lessons≈1046Est. minutes—Sign in to save progress
10
Lesson 10 of 36 · About 24 min

Read DAS Quote, Chart and Account Data with Context

Know the symbol, window, interval and unit behind every value.

A quote is not an execution price

Bid, Ask and Last describe different observations. They do not guarantee the price or quantity of a future fill. Record the symbol, connection and observation time; a number without its context is incomplete evidence.

Advanced Script · read-only inspection. Open quote data for the example symbol before inspecting it. MSFT is an example identifier, not a recommendation.

$feQuote = GetQuoteObj("MSFT");
$feQuote.ShowObject();

The official guide marks quote data as read-only. Missing data, subscriptions and a disconnected feed must be handled before using a value in a calculation.

Read a named study

Advanced Script · read and display. Name a Chart feChart, add the intended VWAP study and name that study feVwap.

$feChart = GetWindowObj("feChart");
$feStudyValue = $feChart.GetStudyVal("feVwap");
MsgBox($feStudyValue);

The documented call reads the study's latest numeric value. Confirm the chart's symbol, interval, session and study configuration. Do not silently treat a developing value as a completed-bar value.

The same guide demonstrates GetBar(-5) for the fifth-last displayed bar. Inspect the returned object's fields before reading them. Do not infer what an undocumented index or missing bar returns.

Advanced Script · inspect a bar object. Keep the same named chart and confirm at least five displayed bars. Compare the returned properties with the chart position.

$feChart = GetWindowObj("feChart");
$feBar = $feChart.GetBar(-5);
$feBar.ShowObject();

Quantity names are not interchangeable

Quantity Meaning
Position quantity Current holdings reported by the account
Order quantity Quantity requested by one order
Filled quantity Executed portion of that order
Remaining quantity Unfilled portion of that order
Buying power An account constraint, not a risk budget

Lab: evidence beside values

Build a note with symbol, chart name, interval, session, study name, build and observation time. Repeat after changing just the interval. If results differ, investigate the configuration before concluding that the API is wrong. Use GetAccountObj(account) only with an explicitly confirmed simulator account; inspect its available properties before depending on them.

Give each number the right time label

Script read time is not exchange event time or the close time of the last completed bar. The market may change between sequential Bid and Ask reads: their spread is an observation, not an atomic quote snapshot. GetSecond() can record a local within-day observation time, but is neither UTC nor evidence of feed freshness.

Read-only quotes and writable attached data

The read-only statement concerns market fields such as BID and ASK. The quote object also exposes a writable .data slot for custom state; this does not let a script change the real bid. Scripts sharing this slot may overwrite one another. See Quote state and accounts.

Worked answer

When changing the interval changes VWAP or Bar values, first inspect study configuration, session and loaded chart range. GetBar(-5) means the fifth-last displayed bar, not automatically the fifth-last completed bar. Keep observation time, chart configuration and value together instead of presenting an isolated number.