Commit 5c3d96b6 authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent 1c264639
...@@ -10,18 +10,31 @@ async function init() { ...@@ -10,18 +10,31 @@ async function init() {
res = await fs.readFileSync('run.csv', 'utf8'); res = await fs.readFileSync('run.csv', 'utf8');
res = res.split('\n') res = res.split('\n')
// console.log(found('ETH', 'Lp2')) let arr = []
// console.log(found('ETH', 'Lp2'))
let com = await fs.readFileSync('com.json', 'utf8'); let com = await fs.readFileSync('com.json', 'utf8');
com = JSON.parse(com) com = JSON.parse(com)
for (let i = 0; i < com.length; i++) { for (let i = 0; i < com.length; i++) {
let t=com[i].platform let t = com[i].platform
t=t.split('_') t = t.split('_')
let pair=t[3].replace('USDT','').replace('USD','') let pair = t[3].replace('USDT', '').replace('USD', '')
let lp=t[4] let lp = t[4]
console.log(found(pair,lp)) arr.push(found(pair, lp))
} }
let header='RowNum,PPST1_stMnBarAge,PPST1_PvtPtPeriod,PPST1_AtrFactor,PPST1_AtrPeriod\n'
for (let i=0;i<arr.length;i++)
{
let inline=(i+1)+','+arr[i].timeframe+','+arr[i].pvt+','+arr[i].factor+','+arr[i].period
header=header+inline
if (i !== arr.length-1)
header= header+'\n'
}
console.log(header)
} }
......
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