return nvertohlc(candlesticks, 1800 This function can be used for converting ticks to ohlc as well with a simple trick. ; Generation: 285 The returning value is a promise which when it's resolved passes one argument with the best found strategy. Import the the module var analytics require alytics or with ES6 modules syntax import analytics from 'alytics analytics object will give you several functions to use. Example: var trades tTrades(candlesticks, strategy: strategy console. MaximumLoss describes how far the price movement went against the wanted direction. Where strategy stands for the currently best strategy found in a certain generation. ; Generation: 299 Fitness:. Log(status Can output: shouldBuy: true, shouldSell: false getTrades(candlesticks, options) Returns an array of trades that were performed on a provided candlestick array with given strategy candlesticks array passed in as a first parameter. npm

Generation is the number of generation which was just completed. ProfitBeforeLoss indicates whether the maximum profit was reached before maximum loss Roadmap Stabilize the solution / fix bugs Make the algorithm more abstract (support for different kind of chromosomes and tree nodes) Delegate td canada trust forex trading indicator generation to a different library (perhaps use node-talib ) Implementing support. Full example: ndStrategy(candlesticks, populationCount: 100, generationCount: 300, selectionAmount: 10, leafValueMutationProbability:.5, leafSignMutationProbability:.3,.3,.2, crossoverProbability:.03, indicators: indicators, function(strategy, fitness, generation) console. Log Fitness: ' fitness Generation: ' generation ).then(function(strategy) console. ProgressCallback parameter has to be a function. This function is invoked when one generation passes. strategy is the result from the findStrategy function and defines when to buy and when to sell. Log Fitness: ' fitness Generation: ' generation ).then(function(strategy) console. Log Fitness: ' fitness Generation: ' generation could print. MaximumProfit describes how far the price movement went on the wanted direction. Revenue is the the revenue that was obtained at the end of a trade.

GitHub - mkmarek/ forex npm