Commit 696e02a3 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent f9804ffc
...@@ -33,7 +33,7 @@ function run(data, config) { ...@@ -33,7 +33,7 @@ function run(data, config) {
money = config.base *(step+1) money = config.base *(step+1)
} }
let d = inlineCheck(money, commision, data[i], profit, lastCom) let d = inlineCheck(money, commision, data[i], profit, lastCom,config.target)
if (Math.abs(d.reserve) > Math.abs(maxReserve)) if (Math.abs(d.reserve) > Math.abs(maxReserve))
...@@ -90,7 +90,7 @@ function run(data, config) { ...@@ -90,7 +90,7 @@ function run(data, config) {
let opt = { let opt = {
platform: data[0].signal, platform: data[0].signal,
type: config.type + ' param:' + config.param + ' base:' + config.base, type: config.type + ' param:' + config.param + ' base:' + config.base +' target:'+config.target,
total: total, total: total,
avgLevel: maxLevel / total, avgLevel: maxLevel / total,
maxLevel: maxLevel, maxLevel: maxLevel,
...@@ -118,12 +118,12 @@ function run(data, config) { ...@@ -118,12 +118,12 @@ function run(data, config) {
} }
function inlineCheck(money, com, data, profit, lastCom) { function inlineCheck(money, com, data, profit, lastCom,tar) {
// console.log(profit) // console.log(profit)
com = com * money com = com * money
let target = money + Math.abs(profit) + com + lastCom + 1 let target = money + Math.abs(profit) + com + lastCom + tar
let reserve = percentage(money, data.drawDown) let reserve = percentage(money, data.drawDown)
......
let arr=[ let arr=[
{
type: "plus",
commision: 0.0008,
base:100,
paramStart: 100,
paramEnd: 1000,
inidicator: 100
},
{ {
type: "zarib", type: "zarib",
commision: 0.0008, commision: 0.0008,
...@@ -96,10 +88,12 @@ async function add(data) ...@@ -96,10 +88,12 @@ async function add(data)
{ {
for (let i=10;i<1000;i=i+10) for (let i=10;i<1000;i=i+10)
{ {
for (let z=0.5;z<5;z=z+0.5)
arr.push({ arr.push({
type: data.type, type: data.type,
commision: data.commision, commision: data.commision,
base: i, base: i,
target:z,
param: data.paramStart param: data.paramStart
}) })
} }
......
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