Commit 24e31f39 authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent 2f7b1874
const fs = require('fs')
let moment = require('moment-timezone')
let _ = require('lodash')
let data='0,1,2,A2,ETHUSDT,43533.48,43533.46,2022.04.17 21:15:30.801,637858269308017885,1,2,timeframe,pvtPeriod,atrFactor,atrPeriod,000 00:25:00.000,1,1.000,10,14,0.100,5,False,HiHi_LoLo,1.000,1.000,0.000'
let data='num,1,2,timeframe,pvtPeriod,atrFactor,atrPeriod,000 00:25:00.000,1,1.000,10,14,0.100,5,False,HiHi_LoLo,1.000,1.000,0.000'
init()
......@@ -14,11 +14,11 @@ async function init() {
let res = await fs.readFileSync('runres.json', 'utf8');
res=JSON.parse(res)
let header='RowNum,Om,TotOmNo,SigTypeStr,SymName,Ask,Bid,CurTimeY2f,CurTimeTicks,nMnTrdMethodNum,nEntSignalCodeNum,PPST1_stMnBarAge,PPST1_PvtPtPeriod,PPST1_AtrFactor,PPST1_AtrPeriod,PPST2_stMnBarAge,PPST2_PvtPtPeriod,PPST2_AtrFactor,PPST2_AtrPeriod,3crm_nStopLoss_AtrPeriod,3crm_dStopLoss_AtrRiskAdjustmentCoef,3crm_nStopLoss_SwingLookbackBarNo,3crm_bUseTrailSl,enumTrailSlRef,dTrailSlAtrMultiplier,dTpSlRewardToRiskRatio,dRrToStartTrailSl\n'
let header='RowNum,nMnTrdMethodNum,nEntSignalCodeNum,PPST1_stMnBarAge,PPST1_PvtPtPeriod,PPST1_AtrFactor,PPST1_AtrPeriod,PPST2_stMnBarAge,PPST2_PvtPtPeriod,PPST2_AtrFactor,PPST2_AtrPeriod,3crm_nStopLoss_AtrPeriod,3crm_dStopLoss_AtrRiskAdjustmentCoef,3crm_nStopLoss_SwingLookbackBarNo,3crm_bUseTrailSl,enumTrailSlRef,dTrailSlAtrMultiplier,dTpSlRewardToRiskRatio,dRrToStartTrailSl\n'
for (let i=0;i<res.length;i++)
{
let t=data.replace('timeframe',res[i].timeStamp).replace('pvtPeriod',res[i].pvtPeriod).replace('atrFactor',res[i].atrFactor).replace('atrPeriod',res[i].atrPeriod)
let t=data.replace('timeframe',res[i].timeStamp).replace('pvtPeriod',res[i].pvtPeriod).replace('atrFactor',res[i].atrFactor).replace('atrPeriod',res[i].atrPeriod).replace('num',(i+1).toString())
if (i !== res.length-1)
t=t+'\n'
header=header +t
......
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