3.3.8Optional settings for trading requests

A trading instruction through SendOrder() can have an optional third settings parameter controlling how the request is executed by the framework. This settings block can have the following properties:

Property

Description

confirm

The user can control, in MyTrader's settings, whether each widget has its trading activity confirmed or not. If the user has turned confirmation off for your widget you can turn it on setting confirm:true. But you can't do the opposite. You cannot turn off confirmation if the user has turned it on.

showResultDialog

Controls whether the framework displays a message about success/failure of the request. By default, the framework will display an error message for failed requests but nothing for successful requests. If you want to hide the framework's own message and display your own confirmation, then you can set showResultDialog:false (or showResultDialog:""). Other possible values for showResultDialog are "all", meaning "show a message for successes as well as failures", and "noaction" meaning "don't show a message for a request which was successfully carried out, but do show a message for a request which didn't require any action".

fifo

Boolean which can be used to force non-hedging behaviour on hedging accounts (irrelevant and ignored on netting accounts). For example, if fifo:true and the user is long EUR/USD, then placing a sell market order for EUR/USD will close (or partially close) the existing long ticket rather than opening a new one. If omitted, this defaults to the user-controllable setting in the MyTrader platform.