3.9.18Populating a chart's deal ticket

You can use ChartChange() to populate and display a chart's deal ticket. You supply command: "populate-deal-ticket" and an orderDefinition which uses the same format as a request to SendOrder(). For example:

Framework.ChartChange({

mode: "active", // or "all", or "single" plus a .chartId value

command: "populate-deal-ticket",

orderDefinition: {

tradingAction: FXB.OrderTypes.SELL,

volume: 30000,

sl: {pips: 30}

}

});

A couple of notes:

When displaying a chart in a dialog or in an iframe, you can also populate the deal ticket via the initial settings when creating the chart.

Any instrumentId in the orderDefinition is ignored and has no effect. You cannot change the chart symbol via this route. Use set-market instead.