Commit a3f7f444 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 6f7e3884
......@@ -15,18 +15,18 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
let type = config.type + ' param:' + config.param + ' base:' + config.base + ' target:' + config.target + ' targetPercentage:' + targetPercentage.enable
for (let i=0;i<usage.length;i++)
{
if (usage[i] === 'fft') {
type = type + ' ' + usage[i] + ' ' + fft +' '
} else if (usage[i] === 'fftPercent') {
type = type + ' ' + usage[i] + ' ' + fftPercent +' '
} else if (usage[i] === 'fftRunup') {
type = type + ' ' + usage[i] + ' ' + fftRunup +' '
} else if (usage[i] ==='fftDiffDrawDownProfit') {
type = type + ' ' + usage[i] + ' ' + fftDiffDrawDownProfit +' '
}
}
}
if (usage === 'fft') {
type = type + ' ' + usage + ' ' + fft +' '
} else if (usage === 'fftPercent') {
type = type + ' ' + usage + ' ' + fftPercent +' '
} else if (usage === 'fftRunup') {
type = type + ' ' + usage + ' ' + fftRunup +' '
} else if (usage ==='fftDiffDrawDownProfit') {
type = type + ' ' + usage + ' ' + fftDiffDrawDownProfit +' '
}
let saveData = []
candles = candlesData
......@@ -119,27 +119,21 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
if (runBefore === false) {
for (let z=0;z<usage.length;z++)
{
if (usage[z] === 'fft') {
if (countDrop < fft)
continue
} else if (usage[z] === 'fftPercent') {
if (allLossProfit > fftPercent)
continue
} else if (usage[z] === 'fftRunup') {
if (countDropRunup < fftRunup)
continue
} else if (usage[z] ==='fftDiffDrawDownProfit') {
if (diffDrawdownProfitAll > fftDiffDrawDownProfit)
continue
}
if (usage === 'fft') {
if (countDrop < fft)
continue
} else if (usage === 'fftPercent') {
if (allLossProfit > fftPercent)
continue
} else if (usage === 'fftRunup') {
if (countDropRunup < fftRunup)
continue
} else if (usage ==='fftDiffDrawDownProfit') {
if (diffDrawdownProfitAll > fftDiffDrawDownProfit)
continue
}
}
runBefore = true
......
......@@ -20,7 +20,7 @@ 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:2,fftDiffDrawDownProfit:-0.5,usage:['fft','fftRunup']}
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:2,fftDiffDrawDownProfit:-0.5,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
let all=[]
......
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