Commit 8317474f authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent e72fb45e
...@@ -14,6 +14,8 @@ let avgDrawdown = 0 ...@@ -14,6 +14,8 @@ let avgDrawdown = 0
let avgProfit = 0 let avgProfit = 0
let startt = 30 let startt = 30
let baseCompund=100 let baseCompund=100
let baseMeta=0
let tempMeta=0
// //
function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, maxTradeDays, targetPercentage, candlesData, fft, ProfitZeroProfit, fftRunup, ProfitZeroProfitRunup, ProfitZeroDrawDownProfit, ProfitZeroDrawDown, ddPlusRunCount, RunupDrawDownZeroRunupDrawDown, ProfitZeroRunupProfit, ProfitZeroRunupDrawDown, RunUpDrawDownZeroProfit, RunUpDrawDownZeroDrawDownProfit, RunUpDrawDownZeroDrawdown, RunUpDrawDownZeroRunupProfit, RunupZeroRunupDrawDown, RunupZeroProfit, RunupZeroProfitDrawDown, RunupZeroDrawDown, RunupZeroProfitRunup, DrawDownZeroDrawDown, DrawDownnZeroProfit, DrawDownZeroProfitDrawDown, DrawDownZeroProfitRunup, DrawDownZeroRunupDrawDown, ProfitDrawDownZeroDrawDown, ProfitDrawDownZeroProfit, ProfitDrawDownZeroProfitDrawDown, ProfitDrawDownZeroProfitRunup, ProfitDrawDownZeroRunupDrawDown function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, maxTradeDays, targetPercentage, candlesData, fft, ProfitZeroProfit, fftRunup, ProfitZeroProfitRunup, ProfitZeroDrawDownProfit, ProfitZeroDrawDown, ddPlusRunCount, RunupDrawDownZeroRunupDrawDown, ProfitZeroRunupProfit, ProfitZeroRunupDrawDown, RunUpDrawDownZeroProfit, RunUpDrawDownZeroDrawDownProfit, RunUpDrawDownZeroDrawdown, RunUpDrawDownZeroRunupProfit, RunupZeroRunupDrawDown, RunupZeroProfit, RunupZeroProfitDrawDown, RunupZeroDrawDown, RunupZeroProfitRunup, DrawDownZeroDrawDown, DrawDownnZeroProfit, DrawDownZeroProfitDrawDown, DrawDownZeroProfitRunup, DrawDownZeroRunupDrawDown, ProfitDrawDownZeroDrawDown, ProfitDrawDownZeroProfit, ProfitDrawDownZeroProfitDrawDown, ProfitDrawDownZeroProfitRunup, ProfitDrawDownZeroRunupDrawDown
...@@ -565,7 +567,19 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -565,7 +567,19 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
continue continue
allDone++ allDone++
if (data[i].profit>0.1) if (data[i].profit>0.1)
baseCompund=baseCompund+data[i].profit baseCompund=baseCompund+(data[i].profit-0.1)
if (data[i].profit>0.1)
{
tempMeta=0
}
else
{
tempMeta=tempMeta+data[i].profit+0.1
if (tempMeta < baseMeta)
baseMeta=tempMeta
}
if (data[i].side === 'LONG') { if (data[i].side === 'LONG') {
allLongDone++ allLongDone++
...@@ -958,7 +972,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -958,7 +972,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
CompoundPerMonthDrawDown: compoundPerMonth / drawDown, CompoundPerMonthDrawDown: compoundPerMonth / drawDown,
profitPerMonthDrawDown: Math.abs(profitPerMonth) / drawDown, profitPerMonthDrawDown: Math.abs(profitPerMonth) / drawDown,
maxReseve: newReserv, maxReseve: newReserv,
maxMeta: maxMeta, maxMeta: baseMeta,
avgReserve: maxReserve / total, avgReserve: maxReserve / total,
percentage: percentage, percentage: percentage,
avgProfitPerDay: newT, avgProfitPerDay: newT,
......
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