Commit 10c9baf8 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 8c146504
...@@ -127,8 +127,9 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -127,8 +127,9 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
obj = d obj = d
obj.signal = data[i] 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() obj.signal.openTimeStamp=moment.tz(data[i].openDate, 'YYYY.MM.DD HH:mm:ss','GMT').unix()
obj.signal.closeTimeStamp= moment.tz(data[i].closeDate, 'YYYY.MM.DD HH:mm:ss','GMT').unix()
if (d.meta < 0) if (d.meta < 0)
......
...@@ -18,7 +18,8 @@ test2() ...@@ -18,7 +18,8 @@ test2()
function test2() function test2()
{ {
let d=moment('2019.01.17 15:00:00.000', 'YYYY.MM.DD HH:mm:ss').unix() //1547686200
let d=moment.tz('2019.01.17 00:50:00.000', 'YYYY.MM.DD HH:mm:ss','GMT').unix()
console.log(d) console.log(d)
} }
//fs.appendFileSync('error.txt', 'test new line\n'); //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