https://www.reddit.com/r/algotrading/comments/8fqz9w/i_built_an_opensource_algorithmic_trading_platform/ https://devalpha.io/ https://github.com/devalpha-io/devalpha-node https://github.com/devalpha-io/devalpha-example Author: trams (from spelling, out of UK). Filip? Seems that purpose of the charting is just to show the value of your holdings, not just the exchange stock values. If you buy and just hold a stock, you'll see the value appreciate. If you buy and later sell it, you'll just see the buy and sell points. Feed: feeds has a list of feed names and values. The feed value is just a list of event dictionaries. Dictionary attribute 'timestamp' is required. Strategy: event-handling function that takes params: context, action This is the only function where the order and cancel functions are available. context.order() places trade orders context.cancel() cancels an order context.state() gets portfolio state object (open orders, commissions paid, positions, value, etc.) action.type === feed name action.payload corresponds to feed event dictionaries Also gets called for lifecycle events with type values of '@@devalpha/INITIALIZED' and '@@devalpha/FINISHED' createTrader function takes {feeds: {feedListDict}, dashboard: {dashBoardDict}}, stratFn 1. feedListDict (Map of feed lists) 2. optional dashboard options. (If 'active' true, serves results on http port 4449). 3. strategy N.b. at top level that is createTrader({oneDict}, oneFn).function(...) and returns an UNCONSUMED STREAM ?All asynchronous? UNCONSUMED_STREAM.errors(errHandler) // Standard JS Error as callback param UNCONSUMED_STREAM.resume() // BASIC execution with strategy handling // */INITIALZED + our feed events + */FINISHED UNCONSUMED_STREAM.done(finallyHandler) OR // .resume() + finally handler // I don't think that the handler gets any param UNCONSUMED_STREAM.each(itemHandler) OR // The itemHandler gets 1 param which is a dictionary with 2 members // corresponding precisely to the 2 strategy params: // { action: actionDict, state: stateDict } // N.b. state here is the actual object return by context.state(). // Gets called after every call of the strategy. TODO: Prove BUT in README.md example they run uStream.done() and then uStream.resume()? When would you use .each handler as opposed to strategy handler??? Live trading: From https://www.reddit.com/r/algotrading/comments/8fqz9w/i_built_an_opensource_algorithmic_trading_platform/ Yep! You just set backtesting: false in the configuration. You also have to create a broker client (which is merely an object containing two functions: executeOrder and cancelOrder) so that DevAlpha can communicate with your broker. I'll make sure to document how to set it up for realtime trading as soon as possible. Client setup: From https://www.reddit.com/r/algotrading/comments/8fqz9w/i_built_an_opensource_algorithmic_trading_platform/ / This will emit price updates const client = new ExchangeClient() // In this case, client is an EventEmitter and notifies us using the 'price' event // client.on('price', (x) => console.log(x)) // Now, let's turn this bad boy into a stream instead using Highland magic // Read more at https://highlandjs.org/#_(source) const priceStream = _('price', client) Feeds Avanza ? Nordnet