Big News!
I've started working on custom (developer defined) indicators for TradeX. Proof of concept is already working. A developer can add their own indicator/s to the list of default indicators, or entirely replace them.
Now things start to get interesting.
It also means I have to start writing copious amounts of documentation and provide examples of how implement custom indicators so that others can also have some fun.
While I'm working through the implementation of custom (propriety) indicators, I've been giving some thought to how the indicator could be made into a dumb client, that only displays (draws) the data, and does no calculations so as to keep that serverside and private.
chart.addIndicator(indType, name, data) would allow for an optional data parameter where pre-calculated history could be passed in and included in the chart data state.
Live price streams would require having a websocket that the indicator would listen on for the pre-calculated data. Like the exchanges where you subscribe to a token pair via a single api point, you would do the same for the propriety indicators.
TradeX provides the base indicator class that your indicator would extend. This base / parent class exposes the canvas scene api for your indicator to draw on.
TradeX takes care of the rest of indicator management, treating it like one of the defaults.
In theory, this could allow for all sorts of crazy things. You could say have the chart display for example BTC/USDT, while your indicator displays ETH/USDT for comparison.
Or...
BTC/USDT from two different exchanges for arbitraging.
The indicator could draw "anything" on the chart.
In the coming days I 'll be setting up a custom indicator demo on CodeSandbox.