diff --git a/ecosystem/backtest/backtest_stochrsi.js b/ecosystem/backtest/backtest_stochrsi.js index 9a20316e..d508c2a5 100644 --- a/ecosystem/backtest/backtest_stochrsi.js +++ b/ecosystem/backtest/backtest_stochrsi.js @@ -12,15 +12,21 @@ config.STOCHRSI.thresholds={low:30,high:70,persistence:5}; //Trading Advisor config.tradingAdvisor = {enabled:true,candleSize:5,historySize:40,method:'STOCHRSI'};//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 +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