Commit 36e51e2e authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent 2ceed4e7
......@@ -20,9 +20,11 @@ run()
async function run()
{
let obj={sort:'profitPerMonthDrawDown',alocatedReserve:3,alocatedReserveCompound:3,risk:0,start:10000,pfTrade:2,side:'both',riskFreeLevel:100,onlyShortLong:false,loss:0,level:200,dur:1500,maxTradeDays:40,targetPercentage:{enable:true},fft:1,fftPercent:-2,fftRunup:2,fftPercentRunup:{count:7,percent:15},fftDiffDrawDownProfit:-0.5,fftDrawDown:-1,ddPlusRunCount:4,ddPlusRunPercent:-2,ProfitZeroRunupProfit:-2,ProfitZeroRunupDrawDown:-20,usage:'fft'}
let detail=['configs2.json-211021092159_O1_BNC_BTCUSD_Lp1_Y211020a - Copy_Mn.csv&zarib param:1.1 base:200 target:1']
obj.detail=detail
for (let n=1;n<40;n++)
{
let obj={sort:'profitPerMonthDrawDown',alocatedReserve:3,alocatedReserveCompound:3,risk:0,start:10000,pfTrade:2,side:'both',riskFreeLevel:100,onlyShortLong:false,loss:0,level:200,dur:1500,maxTradeDays:40,targetPercentage:{enable:true},fft:1,fftPercent:-2,fftRunup:2,fftPercentRunup:{count:7,percent:15},fftDiffDrawDownProfit:-0.5,fftDrawDown:-1,ddPlusRunCount:4,ddPlusRunPercent:-2,ProfitZeroRunupProfit:(n*-1),ProfitZeroRunupDrawDown:(n*-1),usage:'ProfitZeroRunupProfit'}
// let detail=['configs2.json-211021092159_O1_BNC_BTCUSD_Lp1_Y211020a - Copy_Mn.csv&zarib param:1.1 base:200 target:1']
obj.detail=[]
let all=[]
for (let i=0;i<arr.length;i++)
all.push(add(arr[i]))
......@@ -36,15 +38,17 @@ async function run()
}
obj.data=arr2
createfile(JSON.stringify(obj, null, 2))
createfile(JSON.stringify(obj, null, 2),'config'+n)
}
}
function createfile(data) {
function createfile(data,name) {
return new Promise(function (resolve, reject) {
fs.writeFile('configs.json', data, 'utf8', function (err) {
fs.writeFile('./combiner/'+name+'.json', data, 'utf8', function (err) {
if (err) reject(err);
else resolve(data);
});
......
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