diff --git a/ecosystem/backtest/backtest_nn.js b/ecosystem/backtest/backtest_nn.js index 5e04e4e6..9674c92d 100644 --- a/ecosystem/backtest/backtest_nn.js +++ b/ecosystem/backtest/backtest_nn.js @@ -14,19 +14,23 @@ hodl_threshold:1,scale:5,batch_size:1}; //Trading Advisor config.tradingAdvisor = {enabled:true,candleSize:5,historySize:40,method:'NN'};//candleSize (5 minutes)* historySize (40 minutes) == period +//Date.prototype.toISOString() //Previous Month var previous_month = new Date(); previous_month.setDate(1); previous_month.setMonth(previous_month.getMonth()-1); +previous_month.setDate(2); +var previous = previous_month.toString().slice(0, -14); //Current Month var current_month = new Date(); current_month.setDate(1); current_month.setMonth(current_month.getMonth()); -//Backtest Exchange Data FROM first date previous month TO first date current month -config.backtest = {enabled:true, - daterange:{from:previous_month,to:current_month}, - batchSize: 60 -}; +current_month.setDate(2); +var current = current_month.toString().slice(0, -14); + +//Backtest Exchange Data FROM previous month TO current month + +config.backtest = {enabled:true,daterange:{from:previous_month,to:current_month},batchSize: 60}; //DataBase config.adapter='sqlite';config.adapter.path= 'plugins/sqlite';