Commit 62522a07 authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 34cbdb64
...@@ -990,6 +990,7 @@ function run(data, config, risk, forceZero, pfTrade, riskFreeLevel, detail, loss ...@@ -990,6 +990,7 @@ function run(data, config, risk, forceZero, pfTrade, riskFreeLevel, detail, loss
allTotal: allTotal, allTotal: allTotal,
allDonePer: allDonePer, allDonePer: allDonePer,
newAllDonePer: (allDonePer / Math.abs(arrNew[0].sum)), newAllDonePer: (allDonePer / Math.abs(arrNew[0].sum)),
newMaxReserve:arrNew[0].sum,
allDone: allDone, allDone: allDone,
countOfTrade: data.length, countOfTrade: data.length,
pftrade: newP, pftrade: newP,
......
...@@ -36,18 +36,24 @@ async function test () { ...@@ -36,18 +36,24 @@ async function test () {
enableRateLimit: true, enableRateLimit: true,
}) })
// exchange.urls['api'] = exchange.urls['test']; // exchange.urls['api'] = exchange.urls['test'];
let z = await exchange.createMarketOrder('BTCUSDT', 'Sell', 0.001, 0, {
reduceOnly: true
})
console.log(z)
// let s=await exchange.fetchOpenOrders('BTC/USDT:USDT') // let s=await exchange.fetchOpenOrders('BTC/USDT:USDT')
// console.log(s) // console.log(s)
let d=await exchange.fetchPositions() // let d=await exchange.fetchPositions()
let arr=[] // let arr=[]
for (let i=0;i<d.length;i++) // for (let i=0;i<d.length;i++)
{ // {
//
if (d[i].info.symbol ==='BTCUSDT') // if (d[i].info.symbol ==='BTCUSDT')
arr.push(d[i]) // arr.push(d[i])
} // }
console.log(arr) // console.log(arr)
// console.log(d.length) // console.log(d.length)
// console.log(d) // console.log(d)
......
...@@ -7,7 +7,7 @@ let res ...@@ -7,7 +7,7 @@ let res
let arr = [] let arr = []
let arrRange = [] let arrRange = []
let lastBalance = 1000 let lastBalance = 1000
let size = 50 let size = 25
let balance = lastBalance let balance = lastBalance
init() init()
...@@ -213,7 +213,7 @@ async function run() { ...@@ -213,7 +213,7 @@ async function run() {
for (let i = 0; i < dates.length; i++) for (let i = 0; i < dates.length; i++)
sumAll = sumAll + dates[i].count sumAll = sumAll + dates[i].count
console.log(arrDate) console.log(arrNew)
// for (let i=0;i<arr.length;i++) // for (let i=0;i<arr.length;i++)
// if (arr[i].date.includes('2019-08') || arr[i].date.includes('2019-09')) // if (arr[i].date.includes('2019-08') || arr[i].date.includes('2019-09'))
// console.log(arr[i]) // console.log(arr[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