Trade From 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:

    // your code here to identify FOREX symbols

See STX.Account#isForex

    // your code here to identify symbols that may trade like FOREX symbols

See STX.Account#tradesLikeForex

Once this is done, define your STX.Account#fetchTrades function to to load trades:

Your implementation should set this.trades. The server fetch callback function should return data in STX.Account.Trades format, or you must format it once received

    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.