Commit 312fdfb5 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 82e7eaf3
......@@ -185,13 +185,13 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
maxDays = endDays
let runnigTime = 0
// runnigTime = calculateRunnigTime(data[i].side, moment.tz(data[i].openDate, 'YYYY.MM.DD HH:mm:ss', 'GMT').unix(), moment.tz(data[i].closeDate, 'YYYY.MM.DD HH:mm:ss', 'GMT').unix(), d.targetPrice)
// if (step !== 0)
// runnigTime = runnigTime + (unixMid - unixStart)
//
//
// if (needPrintData)
// obj.runnigTime = runnigTime
runnigTime = calculateRunnigTime(data[i].side, moment.tz(data[i].openDate, 'YYYY.MM.DD HH:mm:ss', 'GMT').unix(), moment.tz(data[i].closeDate, 'YYYY.MM.DD HH:mm:ss', 'GMT').unix(), d.targetPrice)
if (step !== 0)
runnigTime = runnigTime + (unixMid - unixStart)
runnigTime=runnigTime/3600
if (needPrintData)
obj.runnigTime = runnigTime
listDays.push(endDays)
......@@ -575,7 +575,7 @@ function getNewMinDiff(s, c) {
}
function getTargetPrice(side, money, targetMoney, basePrice) {
function getTargetPrice(money, targetMoney, basePrice, side) {
let diffMoney = calPer(money, targetMoney)
if (side === 'LONG')
return percentageAdv(basePrice, diffMoney)
......
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