Commit d4dcfe01 authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent 8773cd7a
...@@ -164,6 +164,8 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -164,6 +164,8 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
let allDone=0 let allDone=0
let allDonePer=0 let allDonePer=0
let lossDonePer=0 let lossDonePer=0
let lossPlusDone=0
let lossPlusDonePer=0
let listDays = [] let listDays = []
let maxReserve = 0 let maxReserve = 0
let maxMeta = 0 let maxMeta = 0
...@@ -824,6 +826,11 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -824,6 +826,11 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
lossDone++ lossDone++
lossDonePer=lossDonePer+data[i].profit-0.1 lossDonePer=lossDonePer+data[i].profit-0.1
allDonePer=allDonePer+data[i].profit-0.1 allDonePer=allDonePer+data[i].profit-0.1
if (data[i].profit>0)
{
lossPlusDone++
lossPlusDonePer=lossPlusDonePer+data[i].profit
}
// unixMid = data[i].unixClose // unixMid = data[i].unixClose
// step++ // step++
step=0 step=0
...@@ -978,6 +985,8 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -978,6 +985,8 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
targetDonePer:targetDonePer, targetDonePer:targetDonePer,
lossDone:lossDone, lossDone:lossDone,
lossDonePer:lossDonePer, lossDonePer:lossDonePer,
lossPlusDone:lossPlusDone,
lossPlusDonePer:lossPlusDonePer,
avgLevel: maxLevel / total, avgLevel: maxLevel / total,
maxLevel: maxLevel, maxLevel: maxLevel,
dur: dur, dur: dur,
......
let pair = 'LINKUSDT' let pair = 'BTCUSDT'
let timeframe = '5m' let timeframe = '5m'
const Downloader = require("nodejs-file-downloader"); const Downloader = require("nodejs-file-downloader");
const extract = require('extract-zip') const extract = require('extract-zip')
...@@ -138,6 +138,7 @@ async function sleep(millis) { ...@@ -138,6 +138,7 @@ async function sleep(millis) {
async function download(year, month) { async function download(year, month) {
let fileName = pair + '-' + timeframe + '-' + year + '-' + month + '.zip' let fileName = pair + '-' + timeframe + '-' + year + '-' + month + '.zip'
let link = 'https://data.binance.vision/data/spot/monthly/klines/' + pair + '/' + timeframe + '/' + fileName let link = 'https://data.binance.vision/data/spot/monthly/klines/' + pair + '/' + timeframe + '/' + fileName
console.log(link)
// console.log(link) // console.log(link)
const downloader = new Downloader({ const downloader = new Downloader({
url: link, url: link,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment