Trade From The Chart - FOREX

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
};

See CIQ.Account#tradesLikeForex

Once this is done, define your CIQ.Account#fetchTrades function to 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

The additional tabs will appear in Positions panel. The main one is the protection tab, which is where "trades" are managed.

TFC FOREX