3.12.7Generating a textual description of an order or trading action

Framework.DescribeOrderOrTemplate() turns an FXB.Order or a trading request into a textual description such as "Buy 0.20 lots EUR/USD". Note: the resulting text is automatically run through the Translation system and will be adjusted to the user's selected language.

For example:

// Generate a caption for trade with orderId T12345

var tradeCaption = Framework.DescribeOrderOrTemplate(Framework.Orders.get("T12345"))

// Generate a caption for a trading request to sell 0.20 lots EUR/USD

var requestCaption = Framework.DescribeOrderOrTemplate({

tradingAction: FXB.OrderTypes.SELL,

instrumentId: "EUR/USD",

volume: {lots: 0.2}

});