When displaying a trading chart as a dialog or in an iframe, the instrument and timeframe for the chart can be provided via a
Properties are as follows. Both are optional, and the entire
| Property | Description |
| instrumentId | ID of the FXB.Instrument to display. Optional. Has a broker-dependent default if unspecified (usually |
| timeframe | Timeframe for the chart. Optional. Has a broker-dependent default if unspecified (usually 3600; H1). |
For example:
// Explicit instrument and timeframe
Framework.CreateDialog({
type: "chart",
settings: { … },
context: {instrumentId: "GBP/USD", timeframe: 3600}
});
// Explicit instrument and default timeframe (usually H1)
Framework.CreateDialog({
type: "chart",
settings: { … },
context: {instrumentId: "GBP/USD"}
});
// Unlikely in real life, but permitted: let the platform choose both the
// instrument and timeframe
Framework.CreateDialog({
type: "chart",
settings: { … },
context: {} // Or simply omit context:{} entirely
});