Commit 211a6aeb authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 1424731d
...@@ -9,7 +9,7 @@ let base = 'base' ...@@ -9,7 +9,7 @@ let base = 'base'
function run(data, config, risk, pfTrade, riskFreeLevel,detail) { function run(data, config, risk, pfTrade, riskFreeLevel,detail) {
let type=config.type + ' param:' + config.param + ' base:' + config.base + ' target:' + config.target let type=config.type + ' param:' + config.param + ' base:' + config.base + ' target:' + config.target
let saveData=[] let saveData=[]
let needPrintData=shouldPrint(detail,data[0].signal) let needPrintData=shouldPrint(detail,data[0].signal+'&'+type)
// console.log(needPrintData) // console.log(needPrintData)
let commision = config.commision let commision = config.commision
...@@ -85,7 +85,7 @@ let obj ...@@ -85,7 +85,7 @@ let obj
obj=d obj=d
obj.maxReserve=maxReserve obj.maxReserve=maxReserve
obj.maxAllocatedMoney=maxAllocatedMoney obj.maxAllocatedMoney=maxAllocatedMoney
obj.maxLevel=maxReserve obj.maxLevel=maxLevel
obj.step=step obj.step=step
obj.money=money obj.money=money
...@@ -290,8 +290,11 @@ function calPer(entry, last) { ...@@ -290,8 +290,11 @@ function calPer(entry, last) {
function shouldPrint(details,type) function shouldPrint(details,type)
{ {
for (let i=0;i<details.length;i++) for (let i=0;i<details.length;i++)
{
if (details[i] ===type) if (details[i] ===type)
return true return true
}
return false return false
} }
......
...@@ -21,7 +21,7 @@ run() ...@@ -21,7 +21,7 @@ run()
async function run() async function run()
{ {
let obj={sort:'profitPerMonthDrawDown',alocatedReserve:3,alocatedReserveCompound:3,risk:1,start:2000,pfTrade:2,side:'both',riskFreeLevel:100,onlyShortLong:false} let obj={sort:'profitPerMonthDrawDown',alocatedReserve:3,alocatedReserveCompound:3,risk:1,start:2000,pfTrade:2,side:'both',riskFreeLevel:100,onlyShortLong:false}
let detail=['configs2.json-211021092159_O1_BNC_BTCUSD_Lp1_Y211020a - Copy_Mn.csv','configs2.json-211021092159_O1_BNC_BTCUSD_Lp1_Y211020a - Copy_Mn.csv'] let detail=['configs2.json-211021092159_O1_BNC_BTCUSD_Lp1_Y211020a - Copy_Mn.csv&zarib param:1.1 base:200 target:1']
obj.detail=detail obj.detail=detail
let all=[] let all=[]
for (let i=0;i<arr.length;i++) for (let i=0;i<arr.length;i++)
......
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