You can open either the
Framework.CreateDialog({type: "dealticket"});
…
Framework.CreateDialog({type: "trading-action"});
In both cases,
Framework.CreateDialog({type: "dealticket"}, function (Msg) {
if (Msg.result) {
// Final result of the dialog, which is now closed
} else {
// Initial update, providing the ID of the dialog
}
});
Both dialogs can be pre-populated with the following optional
| Property | Description |
| instrumentId | Initial instrument to set in the dialog |
| orderDefinition | A complete order definition to pre-populate into the dialog. The possible properties of |
| handleExecution | Defaults to true. If set to false, the dialog returns an |
| message | A brief message to display at the top of the dialog |
For example:
// Display a suggested trade, with an accompanying message, and get the
// user's selection back from the dealticket rather than having the order
// executed by the dealticket
Framework.CreateDialog({
type: "dealticket",
settings: {
orderDefinition: {
tradingAction: FXB.OrderTypes.SELL,
instrumentId: "AUD/USD",
volume: 30000,
sl: {pips: 20}
},
handleExecution: false,
message: "This is my suggested trade"
}
}, function (Msg) {
if (Msg.result && Msg.result.orderDefinition) {
// Dialog is passing back the user's settings rather than executing them itself
} else {
// Initial update, or cancellation of the dialog
}
});
The
| Property | Description |
| allowInstrumentChange | Defaults to true. If false, prevents the user from changing the initial market (which you set using |
| noPosition | If true, the |
| fullMode | By default the |
| noToolsIcon | Can be used to turn off the settings icon in the |