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

init

parent f9804ffc
......@@ -33,7 +33,7 @@ function run(data, config) {
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))
......@@ -90,7 +90,7 @@ function run(data, config) {
let opt = {
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,
avgLevel: maxLevel / total,
maxLevel: maxLevel,
......@@ -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)
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 arr=[
{
type: "plus",
commision: 0.0008,
base:100,
paramStart: 100,
paramEnd: 1000,
inidicator: 100
},
{
type: "zarib",
commision: 0.0008,
......@@ -96,10 +88,12 @@ async function add(data)
{
for (let i=10;i<1000;i=i+10)
{
for (let z=0.5;z<5;z=z+0.5)
arr.push({
type: data.type,
commision: data.commision,
base: i,
target:z,
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