Skip to content

Commit

Permalink
Update backtest_nn.js
Browse files Browse the repository at this point in the history
  • Loading branch information
universalbit-dev authored May 2, 2024
1 parent 2aa2047 commit 9ff4a27
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions ecosystem/backtest/backtest_nn.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 9ff4a27

Please sign in to comment.