This Developer Guide documents the public Data Interface v5 and Command Interface v2 for Anchored VWAP Studio, including object names, payload fields, snapshot rules, command keys, ACK handling, command codes and integration best practices.
Version: 1.00
Product: Anchored VWAP Studio by XTSFORGE
Indicator: XTSFORGE A-VWAP Studio
Interfaces: Data Interface v5, Command Interface v2
Product Page | Quick Start | User Manual
Documentation note: This article documents the public developer interfaces of Anchored VWAP Studio. It describes product operation only. It is not financial advice and does not provide trading recommendations, buy signals, sell signals or performance guarantees. For risk disclaimer, support scope, license/update notes and privacy information, please refer to the Product Page.
Article Map
This article is structured as follows:
- Overview
- Optional Developer Test Scripts
- Data Interface v5
- Data Interface Object Names
- Data Interface Snapshot and Chunking Rules
- Data Interface Payload Fields
- Data Interface Reader Examples
- Data Interface Best Practices
- Command Interface v2
- Command Keys and ACK Handling
- Public Command Table
- Command Sender Examples
- Public Enum and Value Reference
- Integration Best Practices
- Compatibility and Limitations
- Interface Changelog
1. Overview
This Developer Guide is intended for EA and script developers who want to integrate with XTSFORGE A-VWAP Studio from MetaTrader 5.
The indicator provides two public integration layers:
| Interface | Version | Purpose |
|---|---|---|
| Data Interface | v5 | Read current indicator state, VWAP values, band values and anchor state through hidden chart objects. |
| Command Interface | v2 | Control selected indicator functions through terminal Global Variables and hidden text objects. |
The Data Interface is read-oriented. Use it when an EA or script needs current VWAP values, anchor information, alert state or public indicator metadata.
The Command Interface is write-oriented. Use it when an EA, script or external workflow tool needs to control selected indicator functions, such as toggling VWAPs, setting anchor slots, changing anchor visibility, changing labels or changing alert settings.
The examples in this guide are developer samples only. They are not trading systems and do not place, modify or close trades.
Interface scope notice: The Data Interface and Command Interface are optional technical interfaces for local MQL5 workflows. They do not provide trading signals, financial advice, automated trading decisions or order execution. Any external EA, script or automation using these interfaces must be independently tested and validated by its developer or user.
2. Optional Developer Test Scripts
Two optional sample scripts can be provided together with this Developer Guide:
| Sample script | Purpose |
|---|---|
| XTSFORGE_AVWAP_Data_Interface_v5_Readiness_Check.mq5 | Reads, validates and prints hidden Data Interface objects from the indicator. |
| XTSFORGE_AVWAP_Command_Interface_v2_Test_Sender.mq5 | Sends one Command Interface command, waits for ACK and prints the result status. |
These scripts are optional developer tools. They are intended for interface testing, debugging and example integration only.
They are not Expert Advisors, not trading robots and not signal systems. They do not place, modify or close trades. The Command Interface test sender can change the state of Anchored VWAP Studio on the current chart, depending on the selected command.
Recommended installation location inside MetaTrader 5:
MQL5\Scripts\XTSFORGE\
After copying the files into the Scripts folder, compile them in MetaEditor and run them from the Navigator on the chart where Anchored VWAP Studio is attached.
For the Data Interface readiness script, enable Data Interface Mode = Hidden Objects in the indicator inputs first. The corresponding enum value is VWAP_DATA_HIDDEN_OBJECTS.
For the Command Interface test sender, use a command-capable control mode: Bridge or Integrated UI + Bridge. The corresponding enum values are VWAP_CTRL_BRIDGE and VWAP_CTRL_INTEGRATED_BRIDGE. Integrated-only mode ignores bridge commands.
3. Data Interface v5
3.1 Purpose
The Data Interface publishes the current indicator state and latest closed-bar VWAP values through hidden chart label objects.
EAs and scripts can read those objects without accessing indicator buffers directly.
3.2 Enabling the Data Interface
Set Data Interface Mode to Hidden Objects. The corresponding enum value is VWAP_DATA_HIDDEN_OBJECTS.
When disabled, public data objects are deleted or not published.
3.3 Data Value Mode
The Data Interface publishes closed-bar values. The META payload field data_mode currently reports:
closed_bar_only
Developer integrations should treat the published values as closed-bar snapshots unless a future interface version documents a different value mode.
4. Data Interface Object Names
4.1 Public Data Prefix
The public data object prefix is:
XTSF:AVWAP:DATA
4.2 Chart-Specific Base
All objects for one chart use this base:
XTSF:AVWAP:DATA:<ChartID>
4.3 Logical Objects
| Logical object | Object name pattern |
|---|---|
| META | XTSF:AVWAP:DATA:<ChartID>:META |
| Daily period | XTSF:AVWAP:DATA:<ChartID>:PERIOD:DAILY |
| Weekly period | XTSF:AVWAP:DATA:<ChartID>:PERIOD:WEEKLY |
| Monthly period | XTSF:AVWAP:DATA:<ChartID>:PERIOD:MONTHLY |
| Anchors summary | XTSF:AVWAP:DATA:<ChartID>:ANCHORS |
| Anchor slot objects | XTSF:AVWAP:DATA:<ChartID>:ANCHOR:01 through ANCHOR:20 |
4.4 Chunk Objects
Chunk object names use the logical object name plus a part suffix:
<ObjectName>:PART:001
<ObjectName>:PART:002
...
5. Data Interface Snapshot and Chunking Rules
5.1 Snapshot Rule
The snapshot is published as a set of logical objects. The META object is written last and acts as the commit object.
A safe reader should use the META object to detect a completed snapshot.
Recommended read sequence:
- Read the META manifest and rebuild the META payload.
- Require META manifest complete = 1.
- Require META payload snapshot_complete = 1.
- Store the META seq value.
- Read the required PERIOD, ANCHORS and ANCHOR objects.
- Optionally read META again and confirm that seq did not change during the read.
Only process the snapshot when the relevant object payloads are complete and their seq values match the META snapshot sequence.
5.2 Logical Object Count
A complete snapshot publishes 25 logical objects:
- 1 META object
- 3 Period objects
- 1 Anchors summary object
- 20 Anchor slot objects
The META payload includes:
| Field | Expected value |
|---|---|
| expected_objects | 25 |
| period_objects | 3 |
| anchor_objects | 20 |
| anchor_slots_published | 20 |
| commit_object | meta |
5.3 Chunking Rule
Data payloads are stored in chunks. Current constants:
| Constant | Value |
|---|---|
| chunk_size | 128 |
| max_chunks | 20 |
The main object contains a manifest, not the full payload.
Example manifest:
v=1;type=chunked;format=kv;data_type=anchor;data_v=5;seq=25;chunks=4;len=394;chunk_size=128;complete=1
5.4 Manifest Fields
| Field | Meaning |
|---|---|
| v | Manifest version. |
| type | Usually chunked. |
| format | Payload format, currently kv. |
| data_type | Logical payload type. |
| data_v | Data schema version. |
| seq | Snapshot sequence number. |
| chunks | Number of chunk objects. |
| len | Original payload length. |
| chunk_size | Maximum payload characters per chunk. |
| complete | 1 if the payload was fully stored. |
5.5 Payload Format
Payloads use semicolon-separated key/value pairs:
key=value;key=value;key=value
Values are not localized.
6. Data Interface Payload Fields
6.1 Important META Fields
| Field | Meaning |
|---|---|
| v / schema_version | Data Interface schema version. |
| type | meta. |
| seq | Snapshot sequence number. |
| indicator_name / indicator_shortname / indicator_version | Product metadata. |
| symbol / period / timeframe / chart_id / digits | Chart and symbol metadata. |
| data_mode | Data value mode, currently closed_bar_only. |
| snapshot_complete / commit_object / expected_objects | Snapshot completeness and commit metadata. |
| server_time / updated / closed_time / last_closed_bar_time | Timing information. |
| status / last_error | Snapshot status and write error information. |
| active_anchors / max_anchors / selected_anchor_slot / selector_new | Anchor summary and selector state. |
| anchor_visible / anchor_markers_locked / anchor_persistence_mode | Global anchor workflow state. |
| daily_enabled / weekly_enabled / monthly_enabled | Periodic VWAP visibility state. |
| daily_reset_mode / weekly_reset_mode | Reset mode enum values. |
| daily_band_mode / anchor_band_mode / per_anchor_state | Band mode and per-anchor-state metadata. |
| daily_history_mode / daily_days / weekly_weeks / monthly_months | History settings. |
| period_price_source / anchor_price_source / volume_mode | Calculation source settings. |
| control_mode / data_interface_mode | Current public interface mode values. |
| alerts_enabled / alert_status / alert_warning | Global alert state and setup status. |
| alert_terminal / alert_push / alert_email | Alert channel state. |
| push_configured / email_configured | Terminal configuration flags for push and email. |
| alert_targets_* / alert_cross / alert_break / alert_touch / alert_band_touch | Alert targets and trigger states. |
| alert_direction / alert_evaluation_mode / alert_once_per_bar / alert_cooldown_seconds | Alert filtering and throttling settings. |
| command_schema_version / command_interface / command_bridge_active | Command Interface metadata. |
| command_event_id / command_ack / command_capabilities / capabilities | Command event, ACK and capability metadata. |
The META field command_requires_bridge_mode reports 0 for schema v2. This means commands are not limited to Bridge-only mode. Commands are accepted in Bridge and Integrated + Bridge modes. Integrated-only mode still ignores bridge commands.
6.2 PERIOD Payload Fields
Period objects exist for DAILY, WEEKLY and MONTHLY.
| Field | Meaning |
|---|---|
| v / type / seq / name | Schema version, object type, snapshot sequence and period name. |
| enabled / ok / time / value_source | Visibility state, main value validity, latest closed bar time and value source. |
| bands_supported / band_mode | Band capability and current band mode. |
| mid_ok / mid | Main VWAP validity and value. |
| high_ok / high / low_ok / low | Weighted high/low band validity and values. |
| sd1_high_ok / sd1_high / sd1_low_ok / sd1_low | Standard deviation level 1 validity and values. |
| sd2_high_ok / sd2_high / sd2_low_ok / sd2_low | Standard deviation level 2 validity and values. |
| sd3_high_ok / sd3_high / sd3_low_ok / sd3_low | Standard deviation level 3 validity and values. |
6.3 ANCHORS Summary Fields
| Field | Meaning |
|---|---|
| v / type / seq | Schema version, object type and snapshot sequence. |
| active_count / visible_count / max_anchors | Anchor counts and configured active anchor limit. |
| global_visible | Global Anchored VWAP visibility. |
| selected_anchor_slot / selector_new | Selected slot number, or 0 and selector_new=1 for NEW. |
| active_slots / visible_slots | Comma-separated active and visible slot numbers. |
| anchor_times | Comma-separated slot:timestamp pairs. |
6.4 ANCHOR Slot Fields
Anchor slot objects exist for slots 01 through 20.
| Field | Meaning |
|---|---|
| v / type / seq / slot | Schema version, object type, snapshot sequence and 1-based slot number. |
| slot_enabled / active / visible | Slot availability, anchor activity and visual visibility. |
| global_visible / slot_visible / selected | Global visibility, individual visibility and selected state. |
| ok / anchor_time / time / value_source | Main value validity, anchor timestamp, latest closed bar time and value source. |
| color / band_mode / uses_hl_bands / uses_stddev_bands | Slot visual state and band capability state. |
| label_mode / label_text | Slot label mode and sanitized label text or fallback text. |
| mid_ok / mid | Main Anchored VWAP validity and value. |
| high_ok / high / low_ok / low | Weighted high/low band validity and values. |
| sd1_* / sd2_* / sd3_* | Standard deviation band validity and values for levels 1, 2 and 3. |
7. Data Interface Reader Examples
The attached Data Interface readiness script contains a complete reader example. The following simplified examples show the basic idea.
7.1 Read One Payload Field
Concept: Search the semicolon-separated payload for key=value and return the value between the equals sign and the next semicolon.
Example logic:
PayloadFieldValue(payload, "mid_ok") returns "1" when the main value is valid.
PayloadFieldValue(payload, "mid") returns the published VWAP value as text.
7.2 Read Daily VWAP
Object name:
XTSF:AVWAP:DATA:<ChartID>:PERIOD:DAILY
Reader logic:
- Build the object name from the current chart ID.
- Read and rebuild the chunked payload.
- Check mid_ok = 1.
- Read mid and convert it to double.
7.3 Read Active Anchors
Loop through slot numbers 1 to 20 and read:
XTSF:AVWAP:DATA:<ChartID>:ANCHOR:01
...
XTSF:AVWAP:DATA:<ChartID>:ANCHOR:20
For each slot:
- Ignore the slot if active is not 1.
- Ignore the slot if ok is not 1.
- Read mid, color, band_mode, label_mode and label_text as needed.
7.4 Example Payloads
Example META payload:
v=5;type=meta;seq=42;indicator_name=Anchored VWAP Studio by XTSFORGE;indicator_shortname=XTSFORGE A-VWAP Studio;indicator_version=1.00;schema_version=5;symbol=EURUSD;period=5;timeframe=M5;chart_id=123456789;digits=5;data_mode=closed_bar_only;snapshot_complete=1;commit_object=meta;expected_objects=25;period_objects=3;anchor_objects=20;anchor_slots_published=20;status=ok;active_anchors=2;max_anchors=10;daily_enabled=1;weekly_enabled=1;monthly_enabled=0;command_schema_version=2;command_interface=global_variables;command_bridge_active=1;command_event_id=1001;command_ack=1
Example PERIOD:DAILY payload:
v=5;type=period;seq=42;name=DAILY;enabled=1;ok=1;time=1766140800;value_source=closed_bar_only;bands_supported=1;band_mode=3;mid_ok=1;mid=1.08452;high_ok=1;high=1.08540;low_ok=1;low=1.08370;sd1_high_ok=1;sd1_high=1.08610;sd1_low_ok=1;sd1_low=1.08294
Example ANCHOR:01 payload:
v=5;type=anchor;seq=42;slot=1;slot_enabled=1;active=1;visible=1;global_visible=1;slot_visible=1;selected=0;ok=1;anchor_time=1766131200;time=1766140800;value_source=closed_bar_only;color=16744448;band_mode=3;uses_hl_bands=1;uses_stddev_bands=1;label_mode=5;label_text=London Open;mid_ok=1;mid=1.08410;high_ok=1;high=1.08495;low_ok=1;low=1.08320
8. Data Interface Best Practices
- Treat META as the commit object.
- Process only complete snapshots.
- Use seq to avoid repeated work.
- Handle missing fields defensively.
- Ignore inactive slots.
- Check mid_ok before using mid.
- Check band-specific ok fields before using band values.
- Respect visible, slot_visible and global_visible if your logic should follow the chart view.
- Prefer closed-bar values for EA decision logic.
9. Command Interface v2
9.1 Purpose
The Command Interface allows an EA or script to control selected indicator functions through terminal Global Variables and a hidden text object for text payloads.
It is intended for deterministic external control, not for UI simulation.
9.2 Enabling Command Processing
Bridge commands are accepted when Control Mode is set to Bridge or Integrated UI + Bridge. The corresponding enum values are VWAP_CTRL_BRIDGE and VWAP_CTRL_INTEGRATED_BRIDGE. In Integrated-only mode, bridge commands are ignored.
9.3 Command Key Base
The command key base is:
INV_AVWAP:<Symbol>:<Period>:<ChartID>
Example:
INV_AVWAP:EURUSD:5:123456789
10. Command Keys and ACK Handling
10.1 Command Keys
| Key / object | Purpose |
|---|---|
| <Base>:CMD_SEQ | Command sequence. Increment this last for every new command. |
| <Base>:CMD_CODE | Numeric command code. |
| <Base>:CMD_TIME | Anchor time as numeric datetime. |
| <Base>:CMD_VALUE | Numeric value, boolean, enum value, color integer or cooldown seconds. |
| <Base>:CMD_SLOT | 1-based anchor slot number. |
| <Base>:CMD_TEXT | Hidden text object for label text payloads. |
10.2 ACK Keys
| ACK key / object | Purpose |
|---|---|
| <Base>:CMD_ACK_SEQ | ACK sequence number. |
| <Base>:CMD_ACK_CODE | ACK command code. |
| <Base>:CMD_ACK_CHANGED | 1 if the command changed state, 0 if it did not. |
| <Base>:CMD_ACK_TIME | ACK timestamp. |
| <Base>:CMD_ACK_ERROR_CODE | 0 or interface error code. |
| <Base>:CMD_ACK_STATUS | Hidden text object containing ok, no_change, error or ignored. |
| <Base>:CMD_ACK_ERROR | Hidden text object containing the error text. |
10.3 Typical ACK Status Values
| Status | Meaning |
|---|---|
| ok | Command was processed and changed state. |
| no_change | Command was valid but did not change state. |
| error | Command was rejected with an error. |
| ignored | Command was ignored, for example CMD_NONE. |
10.4 Recommended Writing Order
- Write required payload values.
- Write CMD_CODE.
- Increment CMD_SEQ last.
- Optionally send custom event ID 1001 for faster processing.
Custom event text:
XTSFORGE_AVWAP_CMD
11. Public Command Table
| Code | Name | Required payload | Value range / note |
|---|---|---|---|
| 0 | CMD_NONE | none | Ignored. |
| 1 | CMD_ADD_ANCHOR | CMD_TIME | Adds anchor at time, first free slot. |
| 2 | CMD_DEL_ANCHOR | CMD_TIME | Deletes anchor at matching time. |
| 3 | CMD_CLEAR_ALL | none | Clears all anchors. |
| 4 | CMD_SET_DAILY_VWAP | CMD_VALUE | 0/1. |
| 5 | CMD_SET_DAILY_HISTORY | CMD_VALUE | Negative = full, 0 or 1 = current day, 2..5 = last N days. |
| 6 | CMD_SET_DAILY_BAND | CMD_VALUE | 0 OFF, 1 H/L, 2 StdDev, 3 Dual. |
| 7 | CMD_SET_ANCHOR_BAND | CMD_VALUE | Sets NEW/default band mode and all active anchor band modes, 0..3. |
| 8 | CMD_SET_WEEKLY_VWAP | CMD_VALUE | 0/1. |
| 9 | CMD_SET_MONTHLY_VWAP | CMD_VALUE | 0/1. |
| 10 | CMD_SET_ALERTS | CMD_VALUE | 0/1. |
| 11 | CMD_SET_ANCHOR_GLOBAL_VISIBILITY | CMD_VALUE | 0/1. |
| 12 | CMD_SET_ANCHOR_LOCK | CMD_VALUE | 0/1. |
| 13 | CMD_SET_ANCHOR_SLOT_TIME | CMD_SLOT + CMD_TIME | Sets or moves one anchor slot. |
| 14 | CMD_DEL_ANCHOR_SLOT | CMD_SLOT | Deletes one anchor slot. |
| 15 | CMD_SET_ANCHOR_SLOT_VISIBILITY | CMD_SLOT + CMD_VALUE | 0/1. |
| 16 | CMD_SET_ANCHOR_SLOT_COLOR | CMD_SLOT + CMD_VALUE | MQL color integer. |
| 17 | CMD_SET_ANCHOR_SLOT_BAND | CMD_SLOT + CMD_VALUE | 0..3. |
| 18 | CMD_SET_ANCHOR_SLOT_LABEL_MODE | CMD_SLOT + CMD_VALUE | 0..5. |
| 19 | CMD_SET_ANCHOR_SLOT_LABEL_TEXT | CMD_SLOT + CMD_TEXT | Custom label text. |
| 20 | CMD_SET_WEEKLY_HISTORY | CMD_VALUE | 0 full, 1..12 weeks. |
| 21 | CMD_SET_MONTHLY_HISTORY | CMD_VALUE | 0 full, 1..12 months. |
| 22 | CMD_SET_ALERT_CHANNEL_TERMINAL | CMD_VALUE | 0/1. |
| 23 | CMD_SET_ALERT_CHANNEL_PUSH | CMD_VALUE | 0/1, requires MT5 push configuration. |
| 24 | CMD_SET_ALERT_CHANNEL_EMAIL | CMD_VALUE | 0/1, requires MT5 email configuration. |
| 25 | CMD_SET_ALERT_TARGET_DAILY | CMD_VALUE | 0/1. |
| 26 | CMD_SET_ALERT_TARGET_WEEKLY | CMD_VALUE | 0/1. |
| 27 | CMD_SET_ALERT_TARGET_MONTHLY | CMD_VALUE | 0/1. |
| 28 | CMD_SET_ALERT_TARGET_ANCHORED | CMD_VALUE | 0/1. |
| 29 | CMD_SET_ALERT_TARGET_DAILY_BANDS | CMD_VALUE | 0/1. |
| 30 | CMD_SET_ALERT_TARGET_ANCHORED_BANDS | CMD_VALUE | 0/1. |
| 31 | CMD_SET_ALERT_TRIGGER_CROSS | CMD_VALUE | 0/1. |
| 32 | CMD_SET_ALERT_TRIGGER_BREAK | CMD_VALUE | 0/1. |
| 33 | CMD_SET_ALERT_TRIGGER_TOUCH | CMD_VALUE | 0/1. |
| 34 | CMD_SET_ALERT_TRIGGER_BAND_TOUCH | CMD_VALUE | 0/1. |
| 35 | CMD_SET_ALERT_DIRECTION | CMD_VALUE | 0 Both, 1 Bullish, 2 Bearish. |
| 36 | CMD_SET_ALERT_EVALUATION_MODE | CMD_VALUE | 0 Closed bar, 1 Intrabar. |
| 37 | CMD_SET_ALERT_ONCE_PER_BAR | CMD_VALUE | 0/1. |
| 38 | CMD_SET_ALERT_COOLDOWN | CMD_VALUE | 0..3600 seconds. |
12. Command Sender Examples
The attached Command Interface test sender contains a complete command sender example. The following examples show the basic workflow.
12.1 Send a Numeric Command
Concept:
- Build the base key from symbol, period and chart ID.
- Write CMD_VALUE.
- Write CMD_CODE.
- Read the old CMD_SEQ value.
- Write CMD_SEQ = old value + 1.
- Optionally send custom event 1001 with text XTSFORGE_AVWAP_CMD.
12.2 Example: Enable Weekly VWAP
| Field | Value |
|---|---|
| CMD_CODE | 8 |
| CMD_VALUE | 1 |
12.3 Example: Set A1 at a Chart Bar Time
| Field | Value |
|---|---|
| CMD_CODE | 13 |
| CMD_SLOT | 1 |
| CMD_TIME | datetime value of the selected chart bar |
12.4 Example: Set A1 Label Text
| Field / object | Value |
|---|---|
| CMD_CODE | 19 |
| CMD_SLOT | 1 |
| CMD_TEXT object text | London Open |
12.5 Reading ACK
After sending a command, read the ACK Global Variables and ACK text objects:
- CMD_ACK_SEQ
- CMD_ACK_CODE
- CMD_ACK_CHANGED
- CMD_ACK_TIME
- CMD_ACK_ERROR_CODE
- CMD_ACK_STATUS
- CMD_ACK_ERROR
Treat no_change as successful processing without a state change.
13. Public Enum and Value Reference
13.1 Band Modes
| Value | Number | Meaning |
|---|---|---|
| VWAP_BANDS_OFF | 0 | Disabled. |
| VWAP_BANDS_HL | 1 | Weighted H/L. |
| VWAP_BANDS_STDDEV | 2 | Weighted standard deviation. |
| VWAP_BANDS_HL_STDDEV | 3 | Weighted H/L + standard deviation. |
13.2 Label Modes
| Value | Number | Meaning |
|---|---|---|
| PERIODIC_VWAP_LABEL_OFF | 0 | No labels. |
| PERIODIC_VWAP_LABEL_NAME | 1 | Name only. |
| PERIODIC_VWAP_LABEL_PRICE | 2 | Price only. |
| PERIODIC_VWAP_LABEL_NAME_PRICE | 3 | Name + price. |
| AVWAP_LABEL_OFF | 0 | No label. |
| AVWAP_LABEL_NUMBER | 1 | Anchor number only. |
| AVWAP_LABEL_PRICE | 2 | Price only. |
| AVWAP_LABEL_NUMBER_PRICE | 3 | Anchor number + price. |
| AVWAP_LABEL_CUSTOM | 4 | Custom text only. |
| AVWAP_LABEL_CUSTOM_PRICE | 5 | Custom text + price. |
13.3 Price Source Values
| Value | Number | Meaning |
|---|---|---|
| VWAP_PRICE_CLOSE | 0 | Close. |
| VWAP_PRICE_HL2 | 1 | HL/2. |
| VWAP_PRICE_HLC3 | 2 | HLC/3. |
| VWAP_PRICE_OHLC4 | 3 | OHLC/4. |
13.4 Volume Mode Values
| Value | Number | Meaning |
|---|---|---|
| AVWAP_VOL_TICK | 0 | Tick volume. |
| AVWAP_VOL_REAL | 1 | Real volume. |
| AVWAP_VOL_AUTO | 2 | Auto mode. |
13.5 Reset Mode Values
| Value | Number | Meaning |
|---|---|---|
| DAILY_VWAP_RESET_SERVER_DAY | 0 | Server calendar day. |
| DAILY_VWAP_RESET_SYMBOL_SESSION | 1 | Symbol session start. |
| WEEKLY_VWAP_RESET_SERVER_WEEK | 0 | Server calendar week. |
| WEEKLY_VWAP_RESET_FIRST_SESSION | 1 | First symbol session of the week. |
13.6 Control and Data Interface Modes
| Value | Number | Meaning |
|---|---|---|
| VWAP_CTRL_INTEGRATED | 0 | Integrated UI only. |
| VWAP_CTRL_BRIDGE | 1 | Bridge only, hides UI. |
| VWAP_CTRL_INTEGRATED_BRIDGE | 2 | Integrated UI plus Bridge commands. |
| VWAP_DATA_OFF | 0 | Data Interface off. |
| VWAP_DATA_HIDDEN_OBJECTS | 1 | Hidden object data publishing. |
13.7 Alert Values
| Value | Number | Meaning |
|---|---|---|
| VWAP_ALERT_CLOSED_BAR | 0 | Closed-bar evaluation. |
| VWAP_ALERT_INTRABAR | 1 | Intrabar evaluation. |
| VWAP_ALERT_DIRECTION_BOTH | 0 | Both directions. |
| VWAP_ALERT_DIRECTION_BULLISH | 1 | Bullish only. |
| VWAP_ALERT_DIRECTION_BEARISH | 2 | Bearish only. |
13.8 Daily History Mode Values
| Value | Number | Meaning |
|---|---|---|
| VWAP_HISTORY_CURRENT_ONLY | 0 | Current Daily VWAP period only. |
| VWAP_HISTORY_LAST_N | 1 | Last N Daily VWAP periods. Public UI/command workflow supports 2 - 5 days. |
| VWAP_HISTORY_ALL | 2 | Full available Daily VWAP history. |
13.9 Anchor Marker Symbols
| Value | Number | Meaning |
|---|---|---|
| VWAP_MARKER_FILLED_CIRCLE | 0 | Filled circle. |
| VWAP_MARKER_DIAMOND | 3 | Diamond. |
| VWAP_MARKER_SQUARE | 4 | Square. |
| VWAP_MARKER_PLUS | 5 | Plus. |
| VWAP_MARKER_CROSS | 6 | Cross. |
13.10 Other Workflow Values
| Value | Number | Meaning |
|---|---|---|
| VWAP_PERSIST_SOFT_REINIT | 0 | Reinit-persistent anchors. |
| VWAP_PERSIST_FULL | 1 | Restart-persistent anchors. |
| AVWAP_AFTER_SET_SELECT_CREATED | 0 | Select the newly created anchor. |
| AVWAP_AFTER_SET_KEEP_NEW | 1 | Keep selector on NEW. |
| AVWAP_ANCHOR_COLOR_UNIFORM | 0 | Start from uniform color. |
| AVWAP_ANCHOR_COLOR_BY_SLOT | 1 | Start from anchor palette. |
| VWAP_HOTKEY_MOD_NONE | 0 | No modifier. |
| VWAP_HOTKEY_MOD_SHIFT | 1 | Shift. |
| VWAP_HOTKEY_MOD_CTRL | 2 | Ctrl. |
| VWAP_HOTKEY_MOD_CTRL_SHIFT | 3 | Ctrl + Shift. |
14. Integration Best Practices
- Use the Data Interface for reading values and state.
- Use the Command Interface only for supported external control actions.
- Use slot commands for deterministic anchor control.
- Use 1-based anchor slot numbers.
- Write command payloads before incrementing CMD_SEQ.
- Increment CMD_SEQ for every command.
- Read ACK values after sending commands.
- Treat no_change as successful processing without state change.
- Use Data Interface snapshots if the sender needs to verify resulting values.
- Handle missing objects, incomplete snapshots and invalid fields defensively.
15. Compatibility and Limitations
Data Interface v5 and Command Interface v2 are the public interface versions documented for product version 1.00.
The Data Interface uses MetaTrader chart objects. Object visibility, object access and timing are subject to normal MetaTrader chart object behavior.
The Command Interface uses terminal Global Variables and hidden chart text objects. Commands are chart-specific because the key base includes symbol, period and chart ID.
Bridge commands require a command-capable control mode. Integrated-only mode ignores bridge commands.
VWAP values depend on available historical data, broker-provided volume data, broker sessions and the selected price and volume settings.
Future product versions may add fields, commands or capabilities. Existing integrations should handle unknown fields defensively and should check schema/version fields before relying on a snapshot.
16. Interface Changelog
16.1 Version 1.00
| Interface | Version | Release note |
|---|---|---|
| Data Interface | v5 | Initial public Data Interface documentation for hidden-object snapshots. |
| Command Interface | v2 | Initial public Command Interface documentation for global-variable commands and ACK handling. |
16.2 Future Update Notes
Future updates may add additional workflow features, documentation examples or interface enhancements.
Public Data Interface or Command Interface changes should be documented in this article and in the product changelog where relevant.
Documentation Series
This article belongs to the Anchored VWAP Studio documentation series:
- Product Page
- Quick Start & First Setup
- User Manual & Feature Reference
- Developer Guide
For risk disclaimer, support scope, license/update notes and privacy information, please refer to the Product Page.


