Commit 8c146504 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent e289b0f0
......@@ -127,6 +127,9 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
obj = d
obj.signal = data[i]
obj.signal.openTimeStamp=moment(data[i].openDate, 'YYYY-MM-DD HH:mm:ss').unix()
obj.signal.closeTimeStamp=moment(data[i].closeDate, 'YYYY-MM-DD HH:mm:ss').unix()
if (d.meta < 0)
obj.currentDrawDown = Math.abs(((d.meta * 100) / money))
......
const fs = require('fs');
let moment=require('moment-timezone')
tesT()
//tesT()
let closeTime=1611750600000
let openTime=1611304200000
......@@ -14,4 +14,11 @@ function tesT()
const diffInDays = diffInMs / (1000 * 60 * 60 * 24);
console.log(diffInDays)
}
test2()
function test2()
{
let d=moment('2019.01.17 15:00:00.000', 'YYYY.MM.DD HH:mm:ss').unix()
console.log(d)
}
//fs.appendFileSync('error.txt', 'test new line\n');
\ No newline at end of file
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