Commit 477e09b1 authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 3fc881db
......@@ -8,15 +8,21 @@ let arr = []
let lastBalance=1000
let balance =lastBalance
init()
let com
//profitLossString
//drawDownString
async function init() {
let com = await fs.readFileSync('t.json', 'utf8');
com = await fs.readFileSync('t.json', 'utf8');
com = JSON.parse(com)
com=_.shuffle(com)
}
function run()
{
for (let i = 0; i < 10; i++) {
let closeDate = com[i].closeDate.split('_')
let profits = com[i].profitLossString.split('_')
......@@ -66,10 +72,10 @@ async function init() {
start=true
arr2.push(arr[i])
}
// else if (arr[i].date === arrNew[0].date )
// {
// arr2.push(arr[i])
// break
// else if (arr[i].date === arrNew[0].date )
// {
// arr2.push(arr[i])
// break
// }
else if (start)
arr2.push(arr[i])
......@@ -81,9 +87,9 @@ async function init() {
balance=balance+arr2[i].profit
arr2[i].balance=balance
}
createfileADV(JSON.stringify(arr2, null, 2))
// createfileADV(JSON.stringify(arr2, null, 2))
// let index=arrNew[0].index
// let index=arrNew[0].index
// arrNew=[]
// for (let i = index; i < index+1; i++) {
// let sums = 0
......@@ -100,8 +106,7 @@ async function init() {
// }
//
// }
return run()
}
......
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