Trade From Chart


Additional steps are needed to enable the FOREX specific functionality on the TFC tab.

First, make sure that you have the correct checks to identify FOREX symbols.

This is done in the following 2 functions:

CIQ.Account.prototype.isForex = function(symbol) {
	// your code here to identify FOREX symbols

See CIQ.Account#isForex

CIQ.Account.prototype.tradesLikeForex = function(symbol) {
	// your code here to identify symbols that may trade like FOREX symbols (such as CFDs)

See CIQ.Account#tradesLikeForex

Once this is done, define your CIQ.Account#fetchTrades function to load trades. Your implementation should set this.trades. The server fetch callback function should return data in CIQ.Account.Trades format, or you must format it once received.

CIQ.Account.prototype.fetchTrades = function(cb) {
	cb(/*your trade objects here*/);

Finally, set the config as needed:

  • config.reducePosition – set to false if reducing a position is not supported in the account
  • config.hedging – set to true if hedging (owning long and short in same security) is allowed in the account
  • config.vsp – set to M to allow reduction of a specific trade as a market order

Additional tabs will appear in Positions panel. The most relevant one to FOREX trading is the protection tab, which is where "trades" are managed.


Next Steps: