The
Framework.ChartChange({
// Chart(s) to act on
mode: "active",
// Action to carry out
command: "set-market",
// Further parameters required by the type of action
instrumentId: "GBP/USD"
});
| | Description |
| all | Acts on all visible charts in the platform |
| active | Acts on the active chart; the one which the user last clicked on. (In a chart widget, loaded into a chart's sidebar/dock, |
| single | Acts on a single chart, specified by a |
For example, using
Framework.CreateDialog({
type: "chart",
…
}, function (MsgResponse) {
if (MsgResponse.widgetId) {
// Initial response, on dialog creation.
// MsgResponse.widgetId contains the ID which can be used in
// calls to ChartChange(). For example, use ChartChange() to add
// 20-bar EMA to the chart:
Framework.ChartChange({
mode: "single",
chartId: MsgResponse.widgetId,
command: "load-indicator",
indicator: "EMA",
indicatorSettings: {period: 20}
});
} else {
// Subsequent dialog update, such as closure
}
});
Note: the calls for creating drawings, event markers, bar highlights, and HTML require version 3 of the framework or higher.
| | Description |
| Changes the market of a chart | |
| Changes the timeframe of a chart | |
| Loads an indicator | |
| Removes a type of indicator | |
| Removes all indicators | |
| Adds a drawing | |
| Modifies a drawing (including moving it) | |
| Removes a drawing | |
| Removes all drawings | |
| Adds an event marker | |
| Removes an event marker | |
| Removes all event markers | |
| Adds a bar highlight | |
| Removes a bar highlight | |
| Removes all bar highlights | |
| Adds HTML to the chart | |
| Sends a message to the HTML | |
| Removes HTML from the chart | |
| Populates the chart's deal ticket | |
| Hides the chart's deal ticket | |
| Retrieves data and information from the chart |
Note on dates/times: the calls below for creating objects such as drawings are similar to the features which are available in a UDI. However, there is one key difference. All date parameters which are passed to